Mike Hoy wrote:
> is it possible to take information contained inside a text file and put 
> it into a list? My text file contains info derived from a list so it 
> looks like this: ['foo','bar'].

If the file is Python syntax (including an assignment) you can import it 
directly. Or try one of these recipes:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/364469
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/281056

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to