How do I get it all to print on the same line?
I found that on a two second long google search. Don’t know if it’s right, but it’s one of a myriad of solutions you can find on the net.
Or was the whole point of this thread to show how funny your script is supposed to be?
That’s what I’m doing with the commas after the parentheses of the print statements, but because of the while statement they print vertically and the comma seems to have no effect. Also I’d need to get rid of the spaces between each printed string.
EDIT:
Friend showed me how to solve it:
I didn’t know you could add strings.
Oh me me me! Pick me!
My friends call me the Python master.
Or my personal favorite, the one-liner:
Note that I prefer to use Python 2.7, so I use the print statement rather than the print() function.
Yes you can add strings. It’s called string concatenation. Generally there are better ways to join strings though, for optimization, code readability, and flexibility purposes, like
and
(both of which produce the string ‘abc’).