📜  python 评估字符串 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:34.586000             🧑  作者: Mango

代码示例1
# Be *extremely* cautious when using eval(), make sure that the user can't
# execute their own code, otherwise it's a very helpful function.
>>> eval("print(\"Hello, World!\")")
Hello, World!