On 5/26/05, flyaflya <[EMAIL PROTECTED]> wrote:
> a = "(1,2,3)"
> I want convert a to tuple:(1,2,3),but tuple(a) return ('(', '1', ',',
> '2', ',', '3', ')') not (1,2,3)Short answer - use eval(). Long answer - *don't* use eval unless you are in control of the source of the string that you are evaluating. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list
