How to print elements of a list in a row in Python?
I want to print all the elements in a list, in a horizontal manner.
I did in the following way
a = [1,2,3,4,5]
for i in a:
print(i)
But the output I'm getting is in vertical format. How can I make it horizontal?
1 Answer
4 years ago by Divya