DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python create dictionary from csv
mydict = {y[0]: y[1] for y in [x.split(",") for x in open('file.csv').read().split(' ') if x]}
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#create
#dictionary
#csv
ADD COMMENT
Topic
COMMENT
Name
6+8 =
Submit