How can I convert a string using re.compile

young-il sohn sonyi at chollian.net
Mon May 13 19:26:21 EDT 2002


How can I convert the string 'a = [1 2 3;4 5 6;6 7 8]' 
to other string 'a = [[1,2,3],[4,5,6],[7,8,9]]' ?
 
Numeric values can have various forms such as 3.2, -4, 3e+3, 3e-2,
3E+10, 3E-2 and so on. Space can be inserted in the list.



More information about the Python-list mailing list