In while loop for iteration the result is printed in new line why? And how to print all the iteration answer in same line? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In while loop for iteration the result is printed in new line why? And how to print all the iteration answer in same line?

6th Feb 2017, 4:20 PM
Mathi Mathan
2 Answers
+ 1
print(abc, end=' ')
6th Feb 2017, 4:29 PM
Geo Tab
+ 1
what Geo said.. adding , end=' ' to the end of a print function will tell it to not goto next line
6th Feb 2017, 5:09 PM
LordHill
LordHill - avatar