How to print list elements on separated lines in Python

1 Answer

0 votes
lst = ['python', 'php', 'c++', 'c', 'java']
          
print(*lst, sep = '\n')

  
  
  
'''
run:
  
python
php
c++
c
java
                
'''

 



answered May 16, 2020 by avibootz

Related questions

...