0

How do you separate the two added string if there is no space python?

print("ENTER YOUR NAME") name=input() print(name, "Who") lastname=input() print("Your full name is", lastname + name) The output is... NjobvuSolomon

30th Jun 2017, 6:33 AM
Solomon Njobvu
Solomon Njobvu - avatar
1 Antwort
+ 2
Just separate the two variable, by a comma, as you do but without concatenate them: print("Your full name is", lastname, name) ... or concenate them explicitly: print("Your full name is " + lastname + " " + name) ... or use format() method: print("Your full name is {} {}".format(lastname, name))
30th Jun 2017, 7:30 AM
visph
visph - avatar