就是不会保存文本!~求救
追答用txt 还是Excel?
追问TXT
追答Txt那简单啊,存个字典,或者每行一个数据就行了吧
追问唉- - 就是不会才问你啊!~给个代码都好啊
追答Json= dict( name= xxx, password=xxxx)
Info=[]
Info. append( Json)
Import json
Info_write= json. dumps( info)
with open('xxxx.txt', 'w') as f:
f.write( info_write)
这个是存
with open('xxxx.txt','r') as f:
Info_read=f.read()
News=json.loads(info_read)
这个是读
Json in News这个来判断是否存在
追问想保存最后的账号密码 怎么写 代码?