- 1

Spaces

My output for the initials project came out right except with spaces. This is in python. The exercise here, 27.3. fname = input() lname = input() dot = "." print (fname[0],dot,lname[0],dot) J . R . How would I get rid of them? Thanks EDIT: Thanks Lisa the + marks worked

17th Nov 2021, 8:32 PM
Leslie LaCroix
Leslie LaCroix - avatar
1 Antwort
+ 3
edit: You could use the sep-parameter of print or concatenate the strings with +
17th Nov 2021, 9:27 PM
Lisa
Lisa - avatar