Pickle()
import pickle
# Write
a = {'hello': 'world'}
with open('filename.pickle', 'wb') as handle:
pickle.dump(a, handle)
# Read
with open('filename.pickle', 'rb') as handle:
b = pickle.load(handle)
print(a == b)
อ่านเอกสารการใช้งานได้ที่ https://docs.python.org/3/library/pickle.html
Last updated
Was this helpful?