Browse Source

Pickle

pull/3/head
Jure Šorn 6 years ago
parent
commit
f0bc619516
1 changed files with 10 additions and 0 deletions
  1. 10
      README.md

10
README.md

@ -745,6 +745,16 @@ db.commit()
```
Pickle
------
```python
import pickle
favorite_color = {'lion': 'yellow', 'kitty': 'red'}
pickle.dump(favorite_color, open('data.p', 'wb'))
favorite_color = pickle.load(open('data.p', 'rb'))
```
Exceptions
----------
```python

Loading…
Cancel
Save