expand tuple in string

Ansgar Wollnik wiseworld at web.de
Wed Oct 15 17:31:39 EDT 2003


Hello all,

I'd like to expand a tuple into a string (to use this for a MySQL-Select).

result=""
tuple=('one','two','three')
for element in tuple:
	result=result+","+element

But this doesn't work. What can I do to get a string like this:

result="one, two, three"

Thanks for your help,
Ansgar





More information about the Python-list mailing list