📅  最后修改于: 2022-03-11 14:45:24.565000             🧑  作者: Mango
import shelve
shelf = shelve.open(filename)
shelf['key1'] = value1
shelf['key2'] = value2
shelf.close()
# ---
shelf.open(filename)
value1 = shelf['key1']