> If line.startswith('XXX'):
> save list to new file
>
> But I get errors saying only stings can be saved this
> way.
You can save the list if the list can be printed, but
its usually better to save the list contents. You will
need to convert the contents into strings or else use
a binary file.
See my tutor topic on handling files for more, it
includes an examople of saving an address book...
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor