标签:amp using name size air def MLOG pair second
import yaml #向yaml文件中写 with open("E:\个人\ rename.yaml", ‘w‘) as f: project = {‘在远方‘:"1214", "宁夏":"银川","test":‘txt‘} yaml.dump(project,f) #读取yaml文件中的内容 with open("E:\个人\ rename.yaml") as ff: temp = yaml.load(ff.read(),Loader=yaml.FullLoader) for key,values in temp.items(): print(key," ",values)
output:
test txt 在远方 1214 宁夏 银川
标签:amp using name size air def MLOG pair second
原文地址:https://www.cnblogs.com/xiaoran991/p/13456003.html