parse data

py codecraig at gmail.com
Wed Nov 9 16:21:22 CET 2005


I have some data (in a string) such as....

person number 1

Name: bob
Age: 50


person number 2

Name: jim
Age: 39

...all that is stored in a string.  I need to pull out the names of the
different people and put them in a list or something.  Any
suggestions...besides doing data.index("name")...over and over?

thanks!




More information about the Python-list mailing list