Re: convert a string to tuple



Pass it to eval:

>>> eval('(1, 2, 3, 4, 5)')
(1, 2, 3, 4, 5)

Basically what you are doing it evaluating the repr of the tuple.

-Brett

.