string to list? possible?

Piet van Oostrum piet at cs.uu.nl
Mon Jan 21 10:37:36 CET 2002


>>>>> Ewald <ehoute at zeelandnet_dot_nl> (E) writes:

E> Or less ugly:
E> a = '[1,2,3,4]'
E> map(int,filter(lambda x:x.isdigit(),a))

Now try this with a = '[11,12,13,1234]'

-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list