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

+1

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

+1

You're welcome!

+5

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

+3

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.

+2

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

0

Thanks a lot to Axelocity