📌  相关文章
📜  python 检查值是否未定义 - Python 代码示例

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

代码示例2
# for local
if 'myVar' in locals():
  # myVar exists.
# for globals
if 'myVar' in globals():
  # myVar exists.