在python生成了一个大字典,后续需要操作这个字典,怎么办才能不需要重复生成字典的操作呢?
大家讲道理
大家讲道理 2017-04-18 09:48:58
0
1
559

python新手求助。生成了100万个名字和ID号码对应的大字典,花了好长时间,后续需要根据这个字典进行操作,要如何在编写后续代码时不需要重复生成这个字典呢?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
左手右手慢动作

This is a storage issue!

To be simpler, you can use python's own pickle storage method to store the dictionary file as a local file.
However, it is recommended to use sqlite or mysql database for storage, which will make the operation more convenient.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template