I need to save to disk a little dict
object whose keys are of the type str
and values are int
s and then recover it. Something like this:
{'juanjo': 2, 'pedro':99, 'other': 333}
What is the best option and why? Serialize it with pickle
or with simplejson
?
I am using Python 2.6.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…