1. Help Center
  2. Python Programming

How Do You Use Print() Without the Newline?

The solution to this depends on the Python version you are using.
 
Python v2
 
>>print(“Hi. ”),
 
>>print(“How are you?”)
 
Output: Hi. How are you?
 
Python v3
 
>>print(“Hi”,end=“ ”)
 
>>print(“How are you?”)
 
Output: Hi. How are you?