0

whenever you use two print statements, the second print always prints in new line even when \n is not used. how to print them in same line?

18th Oct 2016, 4:52 AM
paras mittal
paras mittal - avatar
2 Antworten
+ 1
print("some text or a variable" end=" ") print("text or variable on the same line as the last") by default, end="\n" but you can change it to essentially anything.
18th Oct 2016, 7:02 AM
Luke Armstrong
0
print (x),print(y) ....this way u can print in version 2.7 n the above mentioned way u can print in 3.5
18th Oct 2016, 10:42 PM
RTJ777
RTJ777 - avatar