-1
l1 = ['apple','banana','carrot','juice']

print(l1)

How can I get the output from looking like this: ['apple', 'banana', 'carrot', 'juice']

To looking like this: apple banana carrot juice

This is just a brief example but still gets the point across about how I can format my output from a list to look better?

Freddy Mcloughlan
  • 4,129
  • 1
  • 13
  • 29

1 Answers1

0
l1 = ['apple','banana','carrot','juice']

text = " ".join([str(x) for x in l1])
print(text)