@Heisenberg No, Python uses lexical scoping, but it also has mutable scopes, which ML doesn't have.
Is Python lexical or dynamic scope?
JavaScript and other languages such as the C family and Python use lexical scope , also called static scope , which means that scope nests according to where functions and variables are declared.
What type of scoping does Python use?
Local (or function) scope is the code block or body of any Python function or lambda expression. This Python scope contains the names that you define inside the function. These names will only be visible from the code of the function.