eval 如何定义函数

eval(compile('''def fun():
    print 'bbb'
''', '<string>', 'exec'))


fun()



原文地址:https://www.cnblogs.com/alangwansui/p/5630431.html