String + string with space in between?


#1

Hello, I have a question:

For instance:

a = Huy
b = Nguyen
print a + b

=> result: HuyNguyen

but I want to print "Huy Nguyen" (not "HuyNguyen"), how should I code? Please help me :slight_smile:


#2

You can use:

print a + " " + b

if you want something simple, but make sure Huy is a string and Nguyen is a string, otherwise it will throw an error.


#3

woa, It's easy :smiley: thank a lot


#4

Sure, no problem. :slightly_smiling_face: Happy coding! :grinning:


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.