Skip to content

Commit f0bc619

Browse files
committed
Pickle
1 parent 2f0ea90 commit f0bc619

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,16 @@ db.commit()
745745
```
746746

747747

748+
Pickle
749+
------
750+
```python
751+
import pickle
752+
favorite_color = {'lion': 'yellow', 'kitty': 'red'}
753+
pickle.dump(favorite_color, open('data.p', 'wb'))
754+
favorite_color = pickle.load(open('data.p', 'rb'))
755+
```
756+
757+
748758
Exceptions
749759
----------
750760
```python

0 commit comments

Comments
 (0)