+ 6
Can I define a function within a function? If not explain why.
6 Réponses
+ 15
You can define a function inside another function. But you can only call it inside the function #1.
It won't work if you call it outside your first function.
# I hope this helps.
+ 6
https://code.sololearn.com/cvzo6jWb7Riv/?ref=app
That's what happens in closures and decorators
+ 5
Yes!!!!!
Python allows you to do that!!!!
I've made a code on python decorators which are the function-related concept in python Programming.
https://code.sololearn.com/coIaUChlHV77/?ref=app
here is a link to a webpage that may help you.It helped me a lot
https://www.programiz.com/python-programming/closure
+ 3
Nothing more to say. 🌲 Alex Tusinean 🔥 just explained all rules and stuff
- 1
You can define a function inside the function but u can only call it inside the function because outside the func it can't work...
For more understable....
We all use calculator...
In calculator we programmed it by inside function that's why we can add, sub, divide at a time by using calculator.....
##i hope this will help##