Thank you for all the videos you make they're really informative and make learning so much easier
@b001 Жыл бұрын
Wow, thank you so much! So generous of you! I'm glad you enjoy my content!
@thefoolishgmodcube2644 Жыл бұрын
Another thing is that lambda functions are faster to create and call compared to regular functions, so if you're obsessed with performance and your function only has a return statement you might as well make it a lambda function.
@steveman1982 Жыл бұрын
But then again, python isn't really the right tool, if you want speed.
@thefoolishgmodcube2644 Жыл бұрын
@@steveman1982 Yeah, more reason why you should opt for the fastest Python code, to make up for its slowness.
@Inf1e Жыл бұрын
if you obsessed with performance you really shouldn't use Python in first place
@bamremix8235 Жыл бұрын
@@Inf1ewell tbh most of the popular machine learning and deep learning modules are easily accessible through python. So saying performance should be ignored while using python is stupid
@ajflink7 ай бұрын
@@bamremix8235 Also, there are ways to make things faster and more efficient in Python if you know what you are doing. There are so many people that blame bad performance on Python yet have so much redundancy in their code that there is no surprise that things are bad performance wise or using a large amount of memory. The most infamous example that I can think of is ArcGIS Pro. If you know, you know. Also, since Python is not bound by strict typing, you can do crazy things not possible in most other languages.
@lindavid19756 ай бұрын
Being able to play the piano whilst programming is a skill.
@Samreyna13 ай бұрын
Makes you think, what he is playing piano with!
@davids7646Ай бұрын
Maybe a keyboard @@Samreyna1
@nandans250613 сағат бұрын
@@Samreyna1 his 3 legs ofcourse
@marclaygeorges2786 Жыл бұрын
Your Python videos are always clear and concise explanations with great examples. Thank you for making these videos!
@b001 Жыл бұрын
Wow! Thank you so much! I’m so glad you enjoy them!!
@WibleWobble Жыл бұрын
its like you can read my mind, every time during the video i had a question, a second later you answered it. Well deserved sub 👍
@jackkraus694811 ай бұрын
What I first used lambda functions for was when I created minesweeper in tkinter. The button components took a function parameter to call when pressed. Since in Minesweeper pressing an empty cell (no adjacent bombs, i.e. no number) reveals the cells around it, I wrote a recursive function that when given a row and column number revealed the cell value in that spot and called the function for the cells around it if the cell was empty. I used lambda to iteratively create functions using that function while passing in a set row and column. TL:DR you can use lambda to create a version of a defined function with filled in parameters
@abhinavjoe Жыл бұрын
My man not only explained me what lamda functions are, but also cleared my doubts about how the map() function works. Very informative and well put video. You're the best.
@TheRealKitWalker Жыл бұрын
I simply love the fact, that how concise this video is. Fantastic. I finally Understood the dreaded lambda function. 💪 Thanks so much dude.
@robbertvandermeijden8 ай бұрын
perfect video. Straight to the point and told me everything I needed to know. Thanks!
@EricWAtchesVideos Жыл бұрын
Thank you for the clear explanation!! I think that like so many of these language features, they solve a problem that doesn't exist. It's nice to have features, but I doubt that I will end up using this ever.
@ElevateCode3 ай бұрын
Amazing explanation, straight to the point and covered what I needed. Thank you!
@qayyax10 ай бұрын
Thank you so much for this video. You are blessed
@FetchTheCow Жыл бұрын
Thank you for the use case! I didn't get it after your lambda short, but now I do.
@ksspqf6016 Жыл бұрын
That's all very nice but I'm too stupid to put that skill into practise
@MarleykHarbdul-xp9ez8 ай бұрын
That's your problem
@ksspqf60168 ай бұрын
@MarleykHarbdul-xp9ez I've rewatched it again and now I'm even more confused than i was a year ago
@montagecentral13796 ай бұрын
@@ksspqf6016 dedication
@ElijahWatts-ji9yx5 ай бұрын
@ksspqf6016 you're probably over complicating it
@seancore14 ай бұрын
@@MarleykHarbdul-xp9ez what is wrong with you
@davids7646Ай бұрын
That higher order function is eye opening now i understand.
Great video! Very simple and clear explanation!! I am currently learning tkinter and I was told that you can use the lambda keyword when assigning a command to a button -> button_1 = tkinter.Button(command=lambda: button_click()). What's the difference between using lambda and just assigning the function without lambda -> button_1 = tkinter.Button(command=button_click)?? Thanks!
@chrysos Жыл бұрын
tkinter takes functions as arguments and calls them with their own arguments. For example if u use .bind("", func) on the main window ure function gets call on press of the Return key (Enter) with ure mouse possitions and more as argumets. this does not matter for ure button command, because it provides no arguments. U can use both of ure examples, but if u want to provide ure own arguments u need to use lambda
run this code, click the button, press Enter and look at the output
@chrysos Жыл бұрын
i am not a pro its just what i could understand myself
@darss10 Жыл бұрын
@@chrysos WOW thanks! So, if I need to pass arguments into my button command, I use lambda, is that it?
@alberthernandez5578 Жыл бұрын
Well this was easy to follow, thank you for the videos bro, they really help out
@sapogatowo Жыл бұрын
Ow mannnn, your code-communication skills are truly amazing! One question, do you have in mind continuing the 'How 2 Python' series? If so, when are you dropping the next video? Hope you are having a great day uwu!
@handlemyece9 ай бұрын
Thank you for the video!
@gaberg21 Жыл бұрын
you explained it super well! will be sending this video to friends who dont get it
@Liz4rdMan Жыл бұрын
It is also usable when you only use a function once so you won't need to create a whole function for it and no one will use it.
@FollowPathfinder Жыл бұрын
Thank’s for the explanation. Lambda functions with map make things look so much easier, I wonder why is this even considered as intermediate Python knowledge?
@fabricehategekimana5350 Жыл бұрын
I think it's because this concept belong to functional programming and go a bit deeper than what people thougth (It come from the lambda calculus). Generally people start with an imperative programming style, go to an object oriented programming style and maybe go to functional programming
@veelone36634 ай бұрын
@@fabricehategekimana5350 huh ? im not even taking intermediate yet and lambda is being introduced rn. You're telling me it gets deeper than this? I'm fucked ..
@tanmaypatel4152 Жыл бұрын
Great video as always! BTW, which font are you using? It is so elegant.
@ArticlesGD4 ай бұрын
lambda: HALF LIFE
@jacksonmadison9994 Жыл бұрын
Man, computer science is so difficult.
@veelone36634 ай бұрын
literally taking programming rn and Idk wtf I'm doing lol
@yashwantdhole7645 Жыл бұрын
My goodness. This is the best and concise explanation of dreaded lambda function
@Arsenit2 ай бұрын
Fantastically simple and quick!
@avgvstvs96 Жыл бұрын
dont stop Sir Bool, these videos breath life into my soul
@yrebrac4 ай бұрын
love the concise explanation
@ninavanleeuwen1183 Жыл бұрын
thank you for the video, but the music is too loud for me!
@stephenburke710811 ай бұрын
you can lose lines 1-7 and just replace line 10 with: cubed = list(map(lambda x: x**3, nums))
@jirafey_ Жыл бұрын
Did you ever make content online? You seem to be professional asf
@Adaephonable Жыл бұрын
This video is inline content...
@amansjourneys210 ай бұрын
Thank you for this! My follow up question would be wouldnt it be easier to create a for loop to cube "nums" and add it to a list called "cubed"?? I'm not seeing how using lambda was faster/easier here
@chrysos Жыл бұрын
why do u use brakets with ure return ?
@jojojux Жыл бұрын
That triggered me too.
@b001 Жыл бұрын
I saw that when editing the video. I'm not sure why I did that lol
@mirlamontano6640 Жыл бұрын
thank you for this video! very informative, useful and clear!! subscribed 💖
@oromogamer14313 ай бұрын
So i used panda and its very slow with my code and large data and chatgpt gave me lambda function for some codes i want to understand the core concept behind it can you do a video on data analysis using lambda?
@williamomon3894 Жыл бұрын
Hey man lovely vid , one question what extension got your IDE to look like that
@neomimendoza8339 Жыл бұрын
Hello! Could you please share your programming environment color scheme and your font? They're so easy on the eyes!
@ahbpoo Жыл бұрын
I searched his previous comments, where someone asked this question, and they got the answer: SynthWave '84
@AHWAProductions Жыл бұрын
man you explain it so well 😭
@seanshimon9 ай бұрын
lambda vs not lambda: def my_map(my_func, my_iter) -> list: result = [] for item in my_iter: new_item = my_func(item) result.append(new_item) return result nums = [3, 4, 5, 6] cube_using_lambda = my_map(lambda x: x**3, nums) print(cube_using_lambda) def my_func_cube(size: int) -> int: return size**3 cube_func = my_func_cube print(my_map(cube_func, nums))
@ajflink7 ай бұрын
lambda is like decorator. They are useful tools but you are not severely crippling yourself by not using them. Due to what I am coding for and how I write Python code, I have never saw any need or desire to use decorators. I do see personal usage for lambda, though.
@Sdksakdjas8 ай бұрын
what vscode theme do u use i really like this one!
@tompov227 Жыл бұрын
Your videos are really informative! What font do you use in your code editor, I really like it and I currently just use the default in mine
@dirtypiggy33345 ай бұрын
love the profile pic lol
@MusicEffekt Жыл бұрын
please make the font a bit larger. Thanks
@sews152311 ай бұрын
awesome vid actually, thanks
@DiegoGomez-en7pn Жыл бұрын
What software do you use to record your videos and shorts?
@xeurek411 ай бұрын
Nice explanation
@cother83127 ай бұрын
So it's like an arrow function in JavaScript?
@magic_cow Жыл бұрын
In a thing I’m working on, I used lambda functions and assigned them to a variable, because they allowed my to put some a if else statement onto 1 line instead of 5 lines, this was amazing since this allowed me to bring 15 lines of codes down to 3 lines of code UPDATE: I put the lambda functions into the things that were calling it, now I am saving 3 more lines of code. Yippie! Function format: (Line 1: defining function Line 2: if statement Line 3: run function Line 4: else statement Line 5: run diffrent function)
@dakookh Жыл бұрын
Jeez… Still can’t get it😢
@itsm0saan Жыл бұрын
what is the font you are using.?
@jonathanvioleta3578 Жыл бұрын
From my understanding, its basically a inline function ?
@heel575 ай бұрын
good explanation but the music is disturbing
@radishark844911 ай бұрын
Simple and useful tutorial❤
@viktoreidrien7110 Жыл бұрын
excellent explanation, thanks man
@baliDOTid Жыл бұрын
what's your vs code theme?
@fcesteghlal9 ай бұрын
why music in the background?
@carlosmillananhel2878 Жыл бұрын
for js people, as much as i understood lambda is the same that (params)=>{...}
@learningforever957 Жыл бұрын
Thank you so much, perfectly explained
@FazliddinSaydullayevbek10 ай бұрын
Your python is looks really beautiful how can i download that
@francoli2281 Жыл бұрын
what colour theme are you using?
@inteligenciaartificiuau11 ай бұрын
Amazing! Thanks!
@sreejishnair5922 Жыл бұрын
Bro what keyboard do you use?
@ahbpoo Жыл бұрын
What theme do you use?
@BroSience.c Жыл бұрын
What vs code theme do you use?
@PHREESKI8 ай бұрын
You need to keep making content
@raylink17224 ай бұрын
Thank you so much
@barbellbilly Жыл бұрын
What vscode theme is this?
@sysy_ep Жыл бұрын
Synthwave '84
@barbellbilly Жыл бұрын
@@sysy_ep Thank you so much!
@dipeshsamrawat7957 Жыл бұрын
Excellent ❤
@JustineEllyn11 ай бұрын
... half-life.
@ironmonkey19905 ай бұрын
thank you
@NeverSaid-8 ай бұрын
This looks like a security vulnerability waiting to happen. And this whole example can be reduced to 2 lines of code: Nums =[3,4,5,6,7] Cubed = [item**3 for item in Nums]
@AlternicityBlogspot19 күн бұрын
Thankyou
@sparetimes12154 ай бұрын
Good video, but don't add background music.
@jakeaustria54455 ай бұрын
Thanks
@CHUAN-CHI Жыл бұрын
Thank you
@khucthuydu19913 ай бұрын
Amazing
@chaithanyav66468 ай бұрын
Brilliant
@Oliver-Zen Жыл бұрын
thanks!
@karimjapparov5324 Жыл бұрын
thank you
@Fisal_Gamal_Elgendy_2002 Жыл бұрын
thanks
@jaksiz11 ай бұрын
You're awesome
@hubertgrzymkiewicz8883 Жыл бұрын
awesome!!
@neonblowfish7 ай бұрын
Great video, but annoying music
@Deveus-y4s Жыл бұрын
Salute to you.
@vladoxgz Жыл бұрын
cubed = [n**3 for n in nums]
@Stefch2Ай бұрын
Stop the music
@tsunningwah347111 ай бұрын
zhina
@krapiak5 ай бұрын
what theme do you use??
@ego-lay_atman-bay Жыл бұрын
What are lambda functions in python? Horse crap
@russ7k Жыл бұрын
So, writing lambda functions are better than writing normal functions?