📜  python 执行字符串 - Python 代码示例

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

代码示例2
import foo
method_to_call = getattr(foo, 'bar')
result = method_to_call()