What do you call a function defined inside another function in Python?
- Child function
- Inner function
- Nested function
- Sub function
A function defined inside another function in Python is called an 'Inner function' or 'Nested function.' They have access to the variables of the enclosing function.
Loading...
Related Quiz
- Which keyword is used to create a class in Python?
- Which Python keyword is used to define a base class?
- You are assigned to optimize a Python application. Which tool would you use to profile the Python code and find the bottlenecks?
- How can you secure sensitive information, like API keys, in a Flask or Django application?
- You're working on a project where a derived class Laptop inherits from two base classes: Computer and PortableDevice. Both base classes have a method named power_on(). If you call power_on() from a Laptop object without any specifications, which method will be invoked?