Python has a predefined format. When we use the
print() function, it ends with a newline by default, and the cursor automatically moves to the next line. To print a statement without a newline, we use a function that prints a statement in a line.
The syntax is shown below:
print(statment, end =" ")
print("Educative Company!") print("My name is John and I works in eduactive company as a project manager") print("Educative Company! ", end =" ") print("You are welcome") a=("Laptop","Mobile","Tablet") print(a)
print()method displays the statement, which ends with a newline.
View all Courses