I was writing a simple Hello World Python script and tried a couple different things to see what I would get.
Results:
print "Hello World" ===> Hello World
print "Hello"," ","World ===> Hello World
print "Hello" "World" ===> HelloWorld
The results surprised me... from experience with other languages I expected to get something more like this:
print "Hello World" ===> Hello World
print "Hello"," ","World ===> Hello World
print "Hello" "World" ===> Syntax Error!
After trying a couple more examples I realized that it seems to add a space whenever you separate strings with a ",".
...Even more strangely, it doesn't seem to care if you give it multiple strings without a "," separating them as the third example shows.
Why does Python's print function act this way???
Also is there a way to stop it from adding spaces for "," separated strings?