The scope of a function means the extent to which the variables and other data items made inside the function are accessible in code.
In Python, the function scope is the function’s body.
Whenever a function runs, the program moves into the function scope. It moves back to the outer scope once the function has ended.