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 270 views
2 answers 357 views
1 answer 261 views
1 answer 294 views
2 answers 252 views
...