python中eval函数使用

把字符串转换为字典:

s = "{'a':1}"

eval(s)

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