I am learning closures in python.why we use closures? Can anyone tell me in detail about the concept? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I am learning closures in python.why we use closures? Can anyone tell me in detail about the concept?

13th Jan 2020, 9:35 AM
monica
monica - avatar
5 Answers
+ 3
What have you not understood exactly ? Closures and decorators are one of the hardest thing to learn, so it is very normal if you don't understand it well at first.
13th Jan 2020, 10:13 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
monica https://www.youtube.com/watch?v=FsAPt_9Bf3U This channel has one of the best videos on python, very well explained. I always lookup his name first when I don't understand something in python. Try it, I hope you like it.
13th Jan 2020, 10:41 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
It returns the nested function object and assigns it to a name.and when you call the name it is invoked.
13th Jan 2020, 9:47 AM
monica
monica - avatar
0
Aymane Boukrouhcan you tell me where or how can I understand clearly?
13th Jan 2020, 10:38 AM
monica
monica - avatar
13th Jan 2020, 10:50 AM
monica
monica - avatar