PYTHON---FILE IO

import pickle shoplistfile = 'shoplist.data' shoplist = ['apple', 'mango', 'carrot'] f = open(shoplistfile, 'wb') pickle.dump(shoplist, f) f.close() del shoplist f = open(shoplistfile, 'rb') store
相關文章
相關標籤/搜索