[Python] 確認某變數/函式/方法是否已定義
- 2025.05.12
- Python Variable Scope
locals() -> dict | Listing variables in local scope. |
globals() -> dict | Listing variables in global scope (current module namespace). |
dir([object]) -> list[str] |
|
vars([object]) -> dict |
|
Last Updated on 2025/05/12 by A1go