Lib Python (stdlib) para serialização e desserlização
1. Saving an object (serialization):
In this example, the dictionary data
is saved to a file named data.pkl
using pickle.dump()
.
2. Loading an object (deserialization):
This code reads the previously saved file data.pkl
and loads the dictionary back into the variable loaded_data
.
So you can save and retrieve Python objects easily using pickle
.