local - Variables defined inside a function or a block are local to that function or block.
global - Variables defined at the top level of a module or file are global. global keyword is used to declare a variable that is defined outside of a function (i.e., in the global scope) and make it accessible within a function
nonlocal - Used inside nested functions to refer to variables in the nearest enclosing function (but not global).
recursive functions - calculating factorial, fibonacci
Top comments (0)