- 1
How can i break line while those three print commands??
3 Answers
+ 2
In which language?
+ 1
you can use \n in the end so that next statement prints in the new line
python automatically prints in new line
+ 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')