Convert a python dict to a string and back

Posted by AJ00200 on Stack Overflow See other posts from Stack Overflow or by AJ00200
Published on 2010-12-28T15:52:32Z Indexed on 2010/12/28 23:54 UTC
Read the original article Hit count: 132

Filed under:

I am writing a program that stores data in a dictionary object, but this data needs to be saved at some point during the program execution and loaded back into the dictionary object when the program is run again. How would I convert a dictionary object into a string that can be written to a file and loaded back into a dictionary object? This will hopefully support dictionaries containing dictionaries.

© Stack Overflow or respective owner

Related posts about python