python中的eval 和 exec 和 execfile
摘要:#eval 函数用来计算python表达式并返回结果#exec 可以执行动态的python代码,不返回结果 def hello(): print("hello world") eval("hello()") 输出 hello world exec("hello()") 输出 hello world#
阅读全文
posted @ 2020-11-27 22:12
posted @ 2020-11-27 22:12
posted @ 2020-11-21 20:20
posted @ 2020-11-20 20:15
posted @ 2020-11-15 21:48
posted @ 2020-11-15 21:30
posted @ 2020-11-14 23:51
posted @ 2020-11-14 23:44