how to read list from file

Harvey Greenberg hjgreenberg at gmail.com
Sun Oct 6 12:57:13 EDT 2013


On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote:
> I am looping as for L in file.readlines(), where file is csv.
> 
> 
> 
> L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first item is a dir and 2nd is a list, so parsing with split doesn't work.  Is there a way to convert L, which is a string, to the list of 3 items I want?

Yay!!!! It worked.  Thanks!



More information about the Python-list mailing list