📜  如何检查 python 中是否存在变量 - TypeScript 代码示例
📅  最后修改于: 2022-03-11 14:48:33.303000             🧑  作者: Mango
代码示例2
# for local
if 'myVar' in locals():
# myVar exists.
# for globals
if 'myVar' in globals():
# myVar exists.