When print message in python 3.x, Python print function will display message in a new line. How to print without newline? In this tutorial, we will introduce you how to do.
Print message defautly in python 3.5
string = "Hello" for i in range(len(string)): print(string[i])
The result is:
H e l l o
You may find python print function display message in new line.
Print message without new line in python 3.5
string = "Hello" for i in range(len(string)): print(string[i], end='')
The output is:
Hello