Answers for "how to write dictionary in file in python"

2

how to save dict in txt format

dict = {'Python' : '.py', 'C++' : '.cpp', 'Java' : '.java'}
f = open("dict.txt","w")
f.write( str(dict) )
f.close()
Posted by: Guest on May-27-2020

Code answers related to "how to write dictionary in file in python"

Python Answers by Framework

Browse Popular Code Answers by Language