Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python write a dictionary to file

dictionary = {'someKey' : 'someValue'}
file_path = 'somePathToFile/someFileName.py'
with open(file_path, 'w') as output_file:
    print(dictionary, file=output_file)
 
PREVIOUS NEXT
Tagged: #python #write #dictionary #file
ADD COMMENT
Topic
Name
9+2 =