![]() However, in some cases we may want to output multiple strings on the same line using separate print statements. Try running this code to see an example: print( 'Banana')Īs expected, the output of each print statement is shown on its own line. By default, the print function adds a newline character at the end of the printed content, so the next output by the program occurs on the next line. In Python, the built-in print function is used to print content to the standard output, which is usually the console. In this article, we'll examine how to print a string without a newline character using Python.
0 Comments
Leave a Reply. |