How can i break line while those three print commands?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

How can i break line while those three print commands??

16th Mar 2018, 5:22 PM
Mayank Painkra
Mayank Painkra - avatar
3 Answers
+ 2
In which language?
16th Mar 2018, 5:31 PM
Baraa AB
Baraa AB - avatar
+ 1
you can use \n in the end so that next statement prints in the new line python automatically prints in new line
16th Mar 2018, 5:28 PM
kaliki chandu
kaliki chandu - avatar
+ 1
example: imagine you have a list: mylist = ['one', 'two', 'three'] to print each element in its line you can just do: for element in mylist: print(element) the output would be: one two three Another way would be to just do: print(*mylist, sep='\n')
16th Mar 2018, 5:35 PM
Ulisses Cruz
Ulisses Cruz - avatar