Python: How do I write a list to file and then pull it back into memory (dict represented as a string convert to dict) later?

后端 未结 6 2016
遥遥无期
遥遥无期 2020-12-23 11:48

More specific dupe of 875228—Simple data storing in Python.

I have a rather large dict (6 GB) and I need to do some processing on it. I\'m trying out several docume

6条回答
  •  旧巷少年郎
    2020-12-23 12:28

    Write it out in a serialized format, such as pickle (a python standard library module for serialization) or perhaps by using JSON (which is a representation that can be evaled to produce the memory representation again).

提交回复
热议问题