📜  如何在python代码示例中给出字符串值变量

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

代码示例1
foo = "bar"
exec(foo + " = 'something else'")
print bar
something else