📜  python 将字典写入文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:21.530000             🧑  作者: Mango

代码示例2
dictionary = {'someKey' : 'someValue'}
file_path = 'somePathToFile/someFileName.py'
with open(file_path, 'w') as output_file:
    print(dictionary, file=output_file)