How to print a list in one line with Python

1 Answer

0 votes
lst = ['python', 'java', 'c#', 'c', 'c++']

for s in lst:
    print(s, end=" ")

'''
run:

python java c# c c++

'''

 



answered Mar 25, 2017 by avibootz

Related questions

1 answer 169 views
2 answers 221 views
1 answer 168 views
1 answer 183 views
2 answers 144 views
...