把字典保存爲二進制文件,而後再讀取內容並顯示。

在這裏使用了編碼解碼json對象python import json list1={'name':'wanglin','sex':'man','phone':1232313463} file=open("8練習.txt","w") file.write(json.dumps(list1)) file.close() file=open("8練習.txt","r") content=file.re
相關文章
相關標籤/搜索