本文共 126 字,大约阅读时间需要 1 分钟。
python 读取文件中的字典配置
hello.txt 内容:
{ 'a':'123', 'b':43}
读取hello.txt dict 文件的配置
f=open('hello.txt','r')my_dict =eval(f.read()) #字典
转载地址:http://hfwmi.baihongyu.com/