Jan Danielsson <[EMAIL PROTECTED]> writes:
> I have a list of integers:
> q = [ 1, 2, 4, 7, 9 ]
> which I would like to convert to a string:
> "1,2,4,7,9"

s = ','.join([str(n) for n in q])

Alternatively, just repr(q) gives you '[1, 2, 4, 7, 9]' (with the
brackets and spaces).
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to