Stringify a list
charlie at begeistert.org
Wed May 16 06:00:04 EDT 2001
> [2, 6, 'A', 8, 'J']
> I don't mind the commas, but how do I remove the quotes and brackets
> without going through contortions?
"A" is the representation of a value. A would be a variable. While you
can convert the list to a string str(list) this doesn't help you.
text = ""
for item in list:
.. text = text + " " + str(item) # add commas if you wish
More information about the Python-list