python store save data

Solutions on MaxInterview for python store save data by the best coders in the world

showing results for - "python store save data"
Benjamin
25 Apr 2017
1import shelve
2
3shelf = shelve.open(filename)
4shelf['key1'] = value1
5shelf['key2'] = value2
6
7shelf.close()
8
9# ---
10
11shelf.open(filename)
12
13value1 = shelf['key1']