2 ответов
+ 5
Faycal HADJI ,
as already said, we can have functions inside functions. here is a sample for calculating properties of a circle:
https://sololearn.com/compiler-playground/c6F666Dh9nHv/?ref=app
+ 3
Yes, but it's called "inner function" at every level
Python also has the concept of "nonlocal" for something similar