scope1 13. Scope of Variable in Python 1. Scope in Python In Python, the scope of a variable refers to the region of the program where the variable can be referenced and modified. There are four main types of scopes in Python. 1-1. Local Local scope refers to variables defined within a function. They are only accessible within that function. 1-2. Enclpsing Enclosing scope refers to the scope of an outer function when referencing a va.. 2024. 3. 18. 이전 1 다음