Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to write and read dictionary to a file in python

# Writing dictionary as json
import json
d = {'guitar':'Jerry', 'drums':'Mickey' }
json.dump(d, open('1.json', 'w'))
 
PREVIOUS NEXT
Tagged: #write #read #dictionary #file #python
ADD COMMENT
Topic
Name
9+7 =