Last updated 3 years ago
Was this helpful?
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)
อ่านเอกสารการใช้งานได้ที่