0
Name initials python
Here is my code: fname = input() lname = input() #your code goes here print(fname[0],".",lname[0]) My output is J . A The output should be J.A What am I doing wrong?
4 ответов
+ 5
print() use softspace " " as separator. You can use your own:
print(frame[0], ".", lname[0], sep="")
+ 3
You can use + instead of the , because the comma inserts a space
+ 1
print(f"{fname[0]},{lname[0]}")
or
print(fname[0] + "." + lname[0])
0
It is now solved.