Как печатать элементы в списке в одной линии Python
>>> l = [1, 2, 3]
>>> print(' '.join(str(x) for x in l))
1 2 3
>>> print(' '.join(map(str, l)))
1 2 3
Hurt Hedgehog
>>> l = [1, 2, 3]
>>> print(' '.join(str(x) for x in l))
1 2 3
>>> print(' '.join(map(str, l)))
1 2 3
fruits = ["Apple","Orange","Watermelon","cherry"]
for fruit in fruits:
print(fruit)
# using for loop
scores = [11, 12, 13, 14, 15, 16]
for score in scores:
print(score)
for p in myList:
print p