[Zope] string to list
DA Loeffler
David.Loeffler@bristol.ac.uk
Tue, 17 Sep 2002 16:50:28 +0100 (BST)
Try the Python eval() function:
>>> eval('["foo","bar"]')
['foo', 'bar']
hth
David
On Tue, 17 Sep 2002, Bryan C. Andregg wrote:
> I have a list that is stored in a database. When I retrieve the list it's
> returned as a string. I.E., ['a', 'b'] is not iterable. Does anyone have a
> conventient way to turn the string back into a list or should I just do the
> store differently?
>
> Cheers,
> --
> Bryan C. Andregg Duke University Medical Center
> Programmer Dept. of Anesthesiology
> e <bryan.andregg@duke.edu>
> p +1 919 684 6201
>