how to read list from file

Harvey Greenberg hjgreenberg at gmail.com
Sat Oct 5 21:08:08 EDT 2013


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?




More information about the Python-list mailing list