Best way to store a large python dictionary in a file

前端 未结 2 452
无人共我
无人共我 2021-01-15 03:18

I have a python script (script 1) which generate a large python dictionary. This dictionary has to be read by an another script (script 2). Could any one suggest me the bes

2条回答
  •  悲&欢浪女
    2021-01-15 03:39

    shelve will give you access to each item separately, instead of requiring you to serialize and deserialize the entire dictionary each time.

提交回复
热议问题