how to create a dictionary from csv file?

Sibylle Koczian nulla.epistola at web.de
Wed Apr 27 11:37:10 EDT 2016


Am 27.04.2016 um 11:31 schrieb Peter Otten:
> Sibylle Koczian wrote:
>
>> And if the csv module is used anyway, why not simply read into a
>> DictReader?
>
> How would that help with looking up 3.5 by "apple" given the OP's sample
> data
>
> banana,4.0
> apple,3.5
> orange,3.0
>

Quite right, it wouldn't. Misread the problem, sorry.





More information about the Python-list mailing list