String + string with space in between?


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:


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.


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


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


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