You absolutely may call a function within another function in Python, so long as the callee is in the scope of the caller.
Check out this question and answer:
Short Description of the Scoping Rules?
The short of it: inside a function, you can call functions in the global scope, the function scope, or, if you’re inside a class, the class scope.
0
solved Python: Calling a function in a function [closed]