The print() function in python always creates a newline. But there is also a parameter for this function which can put other characters instead of new line at the end. In this article we will explore various options for this parameter.
Example
In the below example we see various ways we can assign values to the end parameter and see the result from it.
print("Welcome to ") print("Tutorialspoint") print("Welcome to ", end = ' ') print("Tutorialspoint") print("emailid",end='@') print("tutorialspoint.com")
Output
Running the above code gives us the following result −
Welcome to Tutorialspoint Welcome to Tutorialspoint [email protected]