how to read list from file
Mark Lawrence
breamoreboy at yahoo.co.uk
Sun Oct 6 13:24:21 EDT 2013
On 06/10/2013 17:57, Harvey Greenberg wrote:
> 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!
>
Very pleased to know, but if you need to post again would you be kind
enough to read this first, thanks
https://wiki.python.org/moin/GoogleGroupsPython
--
Roses are red,
Violets are blue,
Most poems rhyme,
But this one doesn't.
Mark Lawrence
More information about the Python-list
mailing list