📌  相关文章
📜  检查变量是否存在 - Python 代码示例

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

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