>>>x = 7 >>> eval( ‘3 * x‘ ) 21 >>> eval(‘pow(2,2)‘) 4 >>> eval(‘2 + 2‘) 4 >>> n=81 >>> eval("n + 4") 85 参考: https://www.runoob.com/python/python-func-eval.html
原文地址:https://www.cnblogs.com/sea-stream/p/11100367.html
时间: 2024-11-04 08:09:58
>>>x = 7 >>> eval( ‘3 * x‘ ) 21 >>> eval(‘pow(2,2)‘) 4 >>> eval(‘2 + 2‘) 4 >>> n=81 >>> eval("n + 4") 85 参考: https://www.runoob.com/python/python-func-eval.html
原文地址:https://www.cnblogs.com/sea-stream/p/11100367.html