Answers for "can i save dictionary to a different 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 "can i save dictionary to a different file in python"

Python Answers by Framework

Browse Popular Code Answers by Language