- 1

Can you write on the same line in python?

I have been wondering about this for a while. Where I really need to print on one line is in for loops. (e.g. Printing 1234... up to 10) Please tell me wether it is possible and if so, how? :)

8th Nov 2017, 4:40 PM
Max S
2 Answers
+ 3
Yes, you just set the optional end argument to an empty string or other character(s). print("some text", end="") print("some more text")
8th Nov 2017, 4:48 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Thanks!
8th Nov 2017, 5:09 PM
Max S