Shane O
Shane O

Reputation: 85

Saving to external PY file?

I'm working on a online server, and I need all my list and dict saved. What would be the best and quickest way to approach this?

I tried importing the data, and it works to load the data. But how can I update the imported file?

Upvotes: 1

Views: 108

Answers (1)

hzm
hzm

Reputation: 430

I think you can use pickle/cPickle module to save and load the date, which are built-in module and easy to use.

I am not very sure the meaning of update import file, what about rewrite the content back to the file after updating in the program?

Upvotes: 1

Related Questions