Python convert string object into dictionary

前端 未结 4 1339
太阳男子
太阳男子 2021-01-14 21:48

I have been working to build a complex data structure which would return a dictionary. Currently that class return string object of the form

{
   cset : x,           


        
4条回答
  •  太阳男子
    2021-01-14 22:13

    You probably do want to use Pickle:

    http://docs.python.org/library/pickle.html#pickle.dumps

    It can also return the value as a string, rather than writing to a file.

提交回复
热议问题