simple string parsing ?

TAG tonino.greco at gmail.com
Thu Sep 9 10:06:38 EDT 2004


Hi,

I am new to python and would like to parse a string, well acually a
formula and get the stuff grouped together
eg:

if  I have :

=+GC142*(GC94+0.5*sum(GC96:GC101))

and I want to get :

['=', '+', 'GC142', '*', '(', 'GC94', '+', '0.5', '*', 'sum', '(',
'GC96', ':', 'GC101', ')', ')']

how can I get this ??????

Thanks :)



More information about the Python-list mailing list