- 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? :)
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")
+ 1
Thanks!