How can I format a list to print each element on a separate line in python?
format, line, list, python
Solution
You can just use a simple loop: -
>>> mylist = ['10', '12', '14']
>>> for elem in mylist:
print elem
10
12
14
Problem
How can I format a list to print each element on a separate line? For example I have: ``` mylist = ['10', '12', '14'] ``` and I wish to format the list so it prints like this: ``` 10 12 14 ``` so the \n, brackets, commas and '' is removed and each element is printed on a separate line Thanks