python中eval函数使用

把字符串转换为字典:

s = "{'a':1}"

eval(s)

posted @ 2016-03-14 14:58  lbw  阅读(437)  评论(0编辑  收藏  举报