Split with python

Norman Khine norman at khine.net
Tue Aug 29 13:55:42 EDT 2006


Hello,
I have a csv file which is has a field that has something like:

text.csv
"text (xxx)"
"text (text) (yyy)"
"text (text) (text) (zzz)"

I would like to split the last '(text)' out and put it in a new column,  
so that I get:

new_test.csv
"text","(xxx)"
"text (text)","(yyy)"
"text (text) (text)","(zzz)"

how can this be done?

Thanks

Norman



More information about the Python-list mailing list