Serialization and Deserialization
Last updated 2 years ago
Was this helpful?
import pickle hackers = { 'neut' : 1, 'geohot' : 100, 'neo' : 1000, } for key, value in hackers.items(): print(key, value) serialized = pickle.dumps(hackers) print(f"{serialized = }") deserialized = pickle.loads(serialized) print(f"{deserialized = }")
Output: