For me it was Multiprocessing > Threading > Decorators > Closures > First-Class Functions. Great videos!!
@soupnoodles3 жыл бұрын
this is exactly what happened rip
@HerambLonkar953 жыл бұрын
For me as well
@konyi4493 жыл бұрын
@@tahsintariq8757 me too
@sundaymanali58543 жыл бұрын
yeah wtf lol
@darthvador36998 жыл бұрын
*goes on tutorial for decorators* You: If you haven't seen my video on closures, you may want to check that out since I won't be spending a lot of time on them *goes on video for closures* You: if you haven't seen my video in first time functions you may want to check that out since I won't be spending to much time explaining that Damnit Corey... Nonetheless I love the videos, keep up the good work man.
@coreyms8 жыл бұрын
Haha, sorry about that. Decorators have a few prerequisites that kind've ended up in a chain of videos. Hope you found them useful. Also, I saw the question you wrote about your calculator app in another comment. I'll do my best to answer that one when I have the chance.
@berryblast39308 жыл бұрын
same
@darrenandveronica8 жыл бұрын
Hehe - I want 4 videos deep to get here also. Classes > decorators > closures > here. These are awesome videos by Corey. Each video explains everything awesome
@zbzb-ic1sr7 жыл бұрын
You're Darth Vader, you should know how to code.
@hailstress7 жыл бұрын
Same scenario over here.
@FamilyGuySweden6 жыл бұрын
I ended up here because I was watching "Python OOP Tutorial 3: classmethods and staticmethods". Thats a chain invocation of tutorials :D:D:D
@Asterite6 жыл бұрын
haha same
@privetabdul4 жыл бұрын
lol same
@sudarshanjha67374 жыл бұрын
🙃🙃
@preranajoshi84884 жыл бұрын
hahah same
@meghalbisht67684 жыл бұрын
same! xD
@ledosilverknight46196 жыл бұрын
Corey is a beast at teaching people how to code.
@kelleywooten17124 жыл бұрын
I find Your Tutorials outstanding in terms of ease of understanding. I am 62 years old and haven't touched a keyboard since dbase 3 and Lotus 1-2-3. You are making my learning experience with Python much easier. Thank you very much. Kelley Wooten
@sabbywins Жыл бұрын
Woooooo Go Kelley!
@colemanj648 жыл бұрын
I've watched half a dozen videos on Python first class functions but only now, after watching this from Corey, do I understand it.
@akshgpt74 жыл бұрын
I've been working with Python for so long, but after watching Corey's videos, I realized how many basics I was missing out on! Thank you so much, you're just amazing!
@alperakbash6 жыл бұрын
I have been using python for the last two years, but after watching some of your videos, I have decided to watch all the basic tutorials from your videos, again. Thank you ver much for giving us point of view.
@dgbene16 жыл бұрын
I've made a few attempts at understanding decorators but you really broke it down very well and I got that "why did this ever seem so difficult?" moment. I apricate your pace and the practical examples. Thanks. You have another subscriber.
@melonelonm60745 жыл бұрын
In the decorator closure, I noticed that; log_hi = logger('Hi!) and log_hi(), do not need the function to work. So what is the purpose for the function ?
@classik3056 жыл бұрын
you're a freak of nature, my guy. You just took me to that next Python level. THANK YOU!!
@thsdsyt4 жыл бұрын
This guy really knows how to explain programming languages. Amazing!
@shashanknegi78613 жыл бұрын
I saw ur first video when i was not able to find a good tutorial on iterators and generators and now i refer to ur videos when i have to know anything bout the language... truly an amazing teacher
@Deepak-yz5zl2 жыл бұрын
Some tutorials never gets old! Such a great teacher
@princeofexane5 жыл бұрын
I have read so many articles and was still clueless about this concept. I watched your video only for 10 minutes, something that i thought was so complicated, understood in a jiffy. You are awesome. Thank you so much.
@rishabhmishra29082 жыл бұрын
finally found someone who got me crystal cleared with first class functions, closures and decorators...... good work Corey !
@eugen37758 жыл бұрын
Nice vid , one mention though, @5:13 in the video, in the for loop of javascript , I think the correct line is : result.push(func(arg_list[i])); this way you use the actual array items instead of generating one yourself with i value. Also this way you can let var i = 0 . Thanks
@iamviccckkk Жыл бұрын
I know this is an older video but I just wanted to say how much your videos have helped me to learn Python! I've made my first ever little programme the other day and seeing it actually work and do stuff amazes me. You have made learning Python so much easier than other resources I've looked at. I haven't had the need to use first-class functionality, but your explanations and examples have made it make so much sense! Thank you so much :D
@artihlec7 жыл бұрын
6:30 Corey, you a little bit messed up with your JS my_map function :). It behaves in this particular case as its python counterpart only because an array has values [1,2,3,4,5], try to change items in an array(list) and JS results will do not match with python results. It should look like this: function square(x) { return x * x; } function my_map(func, arg_list) { const result = []; for (var i = 0; i < arg_list.length; i++) { result.push(func(arg_list[i])) } return result; } var squares = my_map(square, [1,2,3,4,5]) console.log(squares) BTW. I've been watching you for a wile and today actually decided to subscribe. A good and useful channel, a good explanation.
@coreyms6 жыл бұрын
Sorry for the super late reply. Yes, that's right. Others have pointed this out as well. I should have caught that when I first ran the code with the 0 index and got the wrong result. Oops! Thanks for the correction!
@snoopyjc5 жыл бұрын
I was about to point out the same thing
@marflage4 жыл бұрын
Or you could use For...of, or For...each functions.
@masterbat89535 жыл бұрын
This is by far the best explanation one can find on youtube about the flow of execution, which is so important for anyone to understand really hard one grasp at first in python
@PunjabiDuoVlogs5 жыл бұрын
I have never seen anything explained anywhere just like you did. THANK YOU. You are really the BEST teacher.
@andresvodopivec59505 жыл бұрын
After reading what the dictionaries say in so many words and very confusing, amazing Corey you did it in a single line very clear. This makes me think "you should be hired by dictionary entities to give definitions". Thanks for your help!
@marting97713 жыл бұрын
I like your explanations and the clarity of your voice. Not to disparage other tutorials on here but most of the Hindi speakers are way hard to understand. Thank you for creating your channel!
@cutefunnyanimals5441 Жыл бұрын
Crazy how sometimes when you read a book, or some instructions, the concept just doesn't stick because of the poor examples being used. This explanation made prefect sense and now I think I have grasped closures. This is the first video of yours I have watched. You have a new subscriber!
@oppaarif39753 жыл бұрын
Your explanation is really simple and clear. I started to learn js fundamental and stumbled upon first class function concept. Got confused for couple of hours and after watching your explanation made me understand it clearly. Cheers.
@draosf Жыл бұрын
Honestly, you should make a full Functional Programming course. I'm writing this comment and haven't even watched the whole video yet. Thank you so much.
@KhattyDT Жыл бұрын
Been watching a lot of tutorial videos but yours is the best! Simple and straight to the point! Thanks a lot.
@ManzoorHussain-gz1vk2 жыл бұрын
I love the ways you teach. My words are not enough to explain how much I love your teaching style and high level content.
@meatyout5 жыл бұрын
Thanks, Corey! Great tutorial as always. However, I think it's important to make it clear that the examples you're giving are just intended to illustrate the concepts of first-class/higher-order functions, etc., and that the same results can be achieved in a more simple and/or readable way: Examples 1 & 2: def exp_list(exp, lst): exped = [i ** exp for i in lst] return exped print(exp_list(2, [1, 2, 3, 4, 5])) # outputs [1, 4, 9, 16, 25] print(exp_list(3, [1, 2, 3, 4, 5])) # outputs [1, 8, 27, 64, 125] Example 4: def wrap_text(tag, txt): print(f"{txt}") wrap_text("h1", "This is a headline") # outputs This is a headline wrap_text("p", "This is a paragraph") # outputs This is a paragraph
@pythonicd12393 жыл бұрын
I know I'm late but I have to say, THANK YOU!! I mean your videos are just perfect, your teaching is amazing, you explain everything so clearly, the quality of the audio and video is also just amazing! Best videos for learning python(and other programming languages) on KZbin.
@Colstonewall9 жыл бұрын
Very nice. Well thought out examples for a topic that's rarely covered.
@heshankumarasinghe31594 жыл бұрын
This video helped. I have been trying to understand higher order functions and have seen a video on another channel and that video made me confused even more. This video really helped. Specially the fact that you used a semi real world example when explaining why would we ever want to return a function from a function helped me understand the importance of higher order functions more. Thank you.
@temporary_variable6 жыл бұрын
Your explanation helps me internalize the topics , I mean they fall at the right place, they are meant to be with ease. Thanks a lot.
@mau_lopez5 жыл бұрын
Excellent video. This is kind of abstract, but with this excellent explanation and simple examples that do not involve other complications but just illustrate the point at hand, everything is clear. I'm really enjoying this and the other Python tutorials from Corey Schafer. Thanks a lot!
@remedyiq80342 жыл бұрын
Best videos on youtube. The way you explain concepts are simply amazing
@bernoulli90475 жыл бұрын
The wrap_text function example after 11:00 would look very nice and readable with python3's f-strings. Thanks for all your hard work, Corey! I really love your videos.
@cryptotv30132 жыл бұрын
Awesome explanation video for both languages, I was struggling past one week on this topic watching more videos finally figured out all.
@andresa2498 жыл бұрын
in 11:00...15:00 we could execute wrap_text subfunction also this way: html_tag('h1')('Test Headline') so in first brackets we have parameters for main function and in second brackets we have parameters for subfunction. Understanding that - it's much easier to understand what happends between 11:00...15:00 Corey, thank you for very good tutorials.
@aashayamballi5 жыл бұрын
Man! Corey you're really great at explaining things, my mind actually blown... Thank you so much!
@abhilashkaluwala4 жыл бұрын
i was struggling to understand this concept, this is the BEST EXPLAINATION ON THE INTERNET.
@mahmoudreda10834 жыл бұрын
classmethods and staticmethods >>> Decorators >>> Closures >>> First-Class Functions. Keep the GOOD work Sir!
@adrianayon55132 жыл бұрын
You did an amazing job explaining this, bravo my good sir!! A like and a sub right here all day!!
@ashwinsingh13255 жыл бұрын
Was trying to learn python syntax for ML and this has really cleared things up! Don't know if you take suggestions but I write notes down for you videos and would love it if you could provide a textual overlay of what topic you're covering. Had to playback a few times to figure out when you switched from passing function example to the return function example.
@dequationblog6 жыл бұрын
Fast becoming a fan here, Mr. Schafer. A+ on the didactics and presentation.
@millaw.17185 жыл бұрын
Thanks a lot for the explanation! I was so confused with decorators, now it makes so much more sense to me :) You are just amazing!
@evergreen76734 жыл бұрын
Hi, I've started to learn with You this year. You do a lot for other people . In this not easy time develop skills, and learning is the one thing which so meaningfull (sorry for my english, I hope its clear :)it gives hope and enjoy:)The way You speak is perfect, also for people who don't speak english very well.
@glitchedgitz3 жыл бұрын
This guy is beast at explaning these complex logic. Thanks For Videos🔥🔥🔥
@YeekyYeeky3 жыл бұрын
when I face some difficulty in understanding python concept , I will first search to see if Corey have video about that topic , Thank you very much
@iautomatecloud93057 жыл бұрын
Hi Corey, thanks for your videos. It certainly helps me clarify concepts and I appreciate what you are contributing to the community. It all works as an explanation, however there are two errors in your JS code that impact the result. Below is version 1.1. I've added it here so other viewers can see a working example of cube and square would get the expected result. I don't think markdown works here, so hopefully other viewers will be able to understand the code in this format. ``` function cube(x){ return x * x * x; } function square(x){ return x * x; } function my_map(func, arg_list){ result = []; //for(var i = 1; i
@joxa6119 Жыл бұрын
The series is super helpful for a person like me that has no computer science background.
@AriaHarmony6 жыл бұрын
Thank you so much! Your vids are super clear and useful!
@meatyout5 жыл бұрын
+Corey Schafer Thanks very much for all your great tutorial, Corey! FYI, there's one mistake in your my_map() function example, using cube: it should read: cubes = my_map(cube, [1 ,2 ,3 ,4 ,5]), then print(cubes) instead of squares ---> print(squares). And you can but you don't "have to" move the cube function above with the square function. No big deal, just in case it confuses some people.
@ayushgupta18812 жыл бұрын
It was really easy to understand the concept in the manner you taught. Thank you !
@simonaugustocarroz44473 жыл бұрын
Well explained and to the point, i cant believe this guy is real
@basu_104 Жыл бұрын
Brilliant step by step build up to higher order function usage. Thanks do much
@salman.1st8 жыл бұрын
Oh man, I was trying to comprehend closures for a the last week, now thanks to you I understand!
@qtran1016 жыл бұрын
as a new python learner, excellent video +1 and subscribed!
@TheFallibleFiend7 жыл бұрын
I especially appreciate your going through the python and javascript together.
@oadams84 жыл бұрын
You genius. I hope you like teaching because we all want more
@aliyaqoob87795 жыл бұрын
Very lucid and the examples made it very clear. Subscribed!
@mohammadalaaelghamry8010 Жыл бұрын
This channel is a treasure. i so much appreciate you. You are awesome.
@ChaosArtist3 жыл бұрын
Thanks for this explanation of First Class Functions and the examples provided. It also helped me understand the map function better.
@richardwalters92495 жыл бұрын
Love these videos ... I see at 04:14, you looked to demonstrate that you can pass a function to another function as an argument. But, you already demonstrated that with the print() function. But the map() function reinforced the idea ... btw, you’re presentation of material is perfect - not too slow, not too much. Very very well demonstrated too. Nice teaching style.
@AhmadShrif5 жыл бұрын
Big fan of your tutorials, very well done and very organized. I would like you to point to an error in your javascript code at 6:27. The error you got can be resolved by adding arg_list[i]) not i to the func() as below: function my_map(func, arg_list){ result = []; for(var i = 0; i < arg_list.length; i++){ result.push(func(arg_list[i])); } return result; } The fix you did will only work if the arg_list is starting with 1 and incrementing by 1. Because you will always operate on the index numbers not the item in that index.
@Glashome5 жыл бұрын
great example for the utility of returning a function. Really helpful
@STFU6652 жыл бұрын
Very well explained. Thank you very much. I know a lot of programming languages, but everytime i learn a new one i got the feeling, that the concepts are just "Pointers of C in more complicated". But maybe that's just me :D
@manushyamusic26 күн бұрын
You made it so easy to understand. Thank you so much.
@20dorko7 жыл бұрын
Thank you so much Corey, this is really great video. I've only seen this one from you but definitely I am going to check more of your Python videos. If others are also as good as this one, I will support you, you have my word :) . Thanks again.
@bermetumarova46832 жыл бұрын
Thanks, finally I understood what is first class functions.
@nriezedichisom1676 Жыл бұрын
Just beautiful. Almost like art. Thank you again Corey
@hubertcombomarketing26934 жыл бұрын
You're amazing guy Corey. Thank You very much for Your work.
@coreyms4 жыл бұрын
Thanks!
@PrinceKumar-um8mw7 жыл бұрын
Very useful Tutorial Corey..Really liked your way of explaining the concepts..
@tomaspinto38336 жыл бұрын
Great, thank you very much! I've been using this without knowing the term, it's really helpful to see it on a easy to understand language like python, i saw this on class but the examples were done with a functional programming and for someone that has only been in procedural programming, it was really confusing
@Descart330 Жыл бұрын
The more closures you add, to closures, it makes more sense as you're like, saving information to make a function be used for a specific purpose.
@DeTeK-Dennis7 жыл бұрын
Great videos Corey. True teacher by heart !!!
@ShynggysZ4 жыл бұрын
Hey Corey, it would be great if you add these two videos (First-Class Functions, Closures ) into a Python playlist (after Function video). It would be perfect continue and flow in that playlist. You have the best Python tuts in youtube (I guess not only in youtube)
@WaitingWithin7 жыл бұрын
WOAH Had no clue you could do that. I am now going to watch your 47 videos. Great Job!
@karsten6006 жыл бұрын
Made me understand first class functions, thank you Corey.
@WarrenMarshallBiz6 жыл бұрын
Fantastic video and crystal clear explanation, thanks so much!
@tradertube7 жыл бұрын
Nice side by side video ! Both are my favorite languages ! Thanks for sharing!
@manjeetrohilla74143 жыл бұрын
this video solved many doubts, from map to first class function to closures and I just realised at 11:00 you can use lambda function instead of wrap_text
@parmachine4703 жыл бұрын
Finally got it. no wonder so many courses drop the ball at closures, decorators, getters setters. Hard part is seeing the inner is accessed by a variable defined as the call of the outer.
@gusirity8 жыл бұрын
Such a good teacher! You make things very clear in a very short time :)
@cigdemylmaz15327 ай бұрын
I started with python beginners, tutorial #8 on Functions, then Classes.. in order to learn decorators I needed to learn closures.. I have to go back to beginners tutorial #9 at some point :D Thank you so much for amazing lectures...
@user-zo2ky4mz7d4 жыл бұрын
Hi Corey, this is the best explanation of this topic i've seen on youtube so far. However I have a few questions: What's the difference between these two approaches of executing high-order functions. Are there any advantages of using one over the other. What is the best way to execute a HOF. 1. print_h1 = html_tag('h1') print_h1('Test Headline') print_h1('Another Headline') 2. html_tag('h1')('Test Headline') html_tag('h1')('Another Headline') Thanks.
@angelikaprzeliorz83254 жыл бұрын
I appreciate your work, you're awesome. Do what you do and help others, because you're doing it great.
@alejandronieto5762 жыл бұрын
Thank you very much Corey, very good explanation and examples!
@Achrononmaster5 жыл бұрын
Another use case is to allow a user to select what type of algorithm they want to use for a solver. A generic solver wrapper can then be used to call the algorithm (function) option the user selects at runtime, without having to class everything. Also useful for profiling different functions which perform the same task.
@AnupamPatel026 жыл бұрын
Great explanation Corey, especially I liked the concept or illustrating it in Python and Javascript
@markrity9 жыл бұрын
It was nice and clear , but in my opinion there is no need in showing it in 2 languages , a specially so similar. Its just makes the video longer , stick up to Python coz' of its easy readability :) Good luck. Keep up with the good work. P.S. Make more of Programming Terms videos ))
@DoJoStan5 жыл бұрын
I actually found the side by side comparison of JavaScript and Python extremely useful. I'm learning Python right now but have used JavaScript for around 2 years and having Corey explain the concept in both languages makes learning the concept in Python alot easier.
@MoAam-n6b3 жыл бұрын
hello the best teacher in youtube "can you plyz make a video of the short cuts keybord like how to select and uncomment the code ...?"
@elevendarter Жыл бұрын
I've learnt about the Higher Order Functions today and when it wasn't clear I knew I had to check your channel what's your take on it. I'm so glad you mentioned it's sometimes complicated even for for you (at least to explain it...) I think I can go to bed without thinking I'm a complete idiot :-))) BTW, the example with the tags was the first example I've seen that kinda made a sense why would someone use it at all.
@lepidoptera9337 Жыл бұрын
They are rarely needed. The number of times you will write an algorithm in your life that will profit from them can be counted on one hand for an average programmer. I thought I needed them once... until I discovered that there was a much better way that didn't use them. ;-)
@souranumaji42134 жыл бұрын
Some people are disliking the video. Either the don't know the alphabets of English or some random guys who don't give a damn about programming. BTW Corey's series is the best I have ever encountered.
@kneelesh484 жыл бұрын
Corey is a great teacher
@youcefguichi31322 жыл бұрын
almost 2023 and still very helpful, thanks a lot for your tutourials
@SeaTaj3 жыл бұрын
You are a light in the dark. Thank you
@SabbirAhmed-ym4yf6 жыл бұрын
I feel comfortable to think like that-> the upper function creates a template for the inner function which then works on variable over the template to produce output.
@alberkulicka9542 жыл бұрын
I felt extremely dumb after watching the video and still not getting the point, but then an idea came up in my head and made this example, where I finally understood. Might help you as well def custom_sum(first_num): def wrap(second_num): print(first_num+second_num) return wrap two_plus_something = custom_sum(2) two_plus_something(5) two_plus_something(10) two_plus_something(20) output: 7 12 22
@gururajchadaga4 жыл бұрын
What a fantastic explanation
@GaneshVernekar-rp7sk5 ай бұрын
6:36 if u find difficult Then heres the information Here we r equaling my_map function to variable named squares and my_map takes arguments as square and list of no. And square argument is operating the square function but not excecuting it.and then result variable which is empty And equating value of i to list of no. And then using append mtd func(i) goes to square function and returns the value to result variable and later return result bcoms equal to square and at last we print it using print(squares)