how to create a dictionary from csv file?

+dime+ donald.ng at gmail.com
Tue Apr 26 10:18:06 EDT 2016


I am learning python.

if I have a csv file, like this
banana,4.0
apple,3.5
orange,3.0

Can anyone show me how to read the csv file line by line and then create a dictionary to contain these keys and values?


Regards,
+dime+ 



More information about the Python-list mailing list