Python中exec的使用
摘要:
>>>globals = {'x':7, .....: 'y':10, .....: 'names':['aa','bb','cc'] .....: } >>>locals = {} >>>a = eval("3*x+4*y",globals,locals) >>>print a 61 >>>exe 阅读全文
posted @ 2016-05-24 19:45 与非朋仔 阅读(1538) 评论(0) 推荐(0) 编辑