file_name=raw_input("Where would you like to save the file?(the file name will be dits)")
output=open(file_name+"dits.txt","w")#saves the path
k=person.keys()
output.write(k)
v=person.values(k)
i=0
for xrange in 3:# prints the values into a readable file
output.write(v)
output.write(" ")
i=i+1
output.close()
我试图将字典保存到文件中,该字典有 1 个键和 3 个值
person[name]=(bd,email,homepage)
这就是我保存字典的方式 我的代码有什么问题?我一直在尝试修复它大约一个小时,谢谢!