python中如何将str转换成dict

>>>user
"{'a':'b'}"
>>>b = eval(user)
>>>b
{'a':'b'}

  

posted @ 2015-04-29 16:29  Xander-Hang  阅读(588)  评论(0编辑  收藏  举报