Space in variable | Sololearn: Learn to code for FREE!


Space in variable

How would i keep space on my program a = "please" b = "help" c = "me" print(a + b + c) ----output---- pleasehelpme How would i keep space between those variable

3/14/2020 5:06:08 AM

Fakea Vangchhia

5 Answers

New Answer


You're welcome!


Hi! Thats right! only between two quotation marks, insert a space inside them.


If it's python, than you may either separate the names of the variables with commas: print(a, b, c) or, if you prefer to explicitly concatenate strings: print(a + ' ' + b + ' ' + c) The combination of both methods would also work: print(a + ' ' + b, c) print(a, b + ' ' + c) P.S. Despite there are two spaces inside quotation marks now, there should be one inside each pair. The additional one is added for better visualization.


There are, actually, spaces. They are just quite thin )


Thanks a lot to Axelocity