Anonymous/Lambda Functions In Python | Python Tutorials For Absolute Beginners In Hindi #36

preview_player
Показать описание


Best Hindi Videos For Learning Programming:

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

In case you did not understand the second example(took me time as well),
This might be oversimplified and if I am wrong do correct,
Basically the key is used to add a criteria for sorting in a list of lists here:


lets say there is a.sort(key=len),
where a is a list of strings, the key=len basically means that the criteria for sorting is the length of each string element of list a.
so,

then this will sort as


In harry bhai's code, the function returns x[1] i.e the second element of each list within the list a, and the key=lambda x:x[1] means to sort the list in ascending order with respect to the second element of the list, Hence

a =[[1, 14], [5, 6], [8, 23]]
a.sort(key=lambda x:x[1])
print(a)

Output: [[5, 6], [1, 14], [8, 23]]
Because second elements/x[1] are 6, 14, 23.

Hope it helps.

jacknapster
Автор

Harry bhai : Like thok dijiye 😁😁😁😁😁.
Me : Okay Ji 😁😁😁❣️

papa_bolte
Автор

mzaa aa gya bhai mein ek saal se english mein coding seekh seekh kr pak gya tha. Hindi mein seekhne ka mza hi kuch aur hai.keep it up

amangupta
Автор

Sir the way you define everything is just so awesome🔥

rishivishwakarma
Автор

Thanks bhai tabyat kharab hone ke baad bhi aapne video banaya

flamboyantperson
Автор

mai apka ye python ka series Dekh rha hu or vakai bahut maza aa rha hai padh ke bcoz sbkch clr ho rha hai.
Thank you for provinding this series.

tarang
Автор

get well soon bro, i will use lambda instead of def

rohanbeast
Автор

Get well soon and mere ko normal wala function jyada easy or acha lagta

h.sverma
Автор

sir level video hain apki, its the first video i have seen on your channel

zainshahbaz
Автор

If you are watching this video on pc/laptop and want to download it
simply do to the link of the video and at the end of "youtube" type "pp" and hit enter now you can download it at any quality☺♥

mrmamraa
Автор

Thanks bhaiya your video worth in 2022 and I learning with vs code
Lots of love from bharatpur, rajasthan

sensehumour
Автор

Harry bhai's first video ever which left me confused and with doubts...

dheerajparmar
Автор

#day36, bhaiya bahut acchi tarah se samjaaya. THANK YOU MUCH💖

zenyoko
Автор

it's is not a big deal to understand lambda for intermediate or advanced level programmers but it's very hard for beginners. You didn't explain in such a way that a beginner can understand.

ShivamKumar-vvop
Автор

Bro you deserve more subscribers and like ❤

invisibleman
Автор

Bhaiya pehle se hi acche vdo banate the kaash uss time maine programming seekhna shuru kiya hota 😭

Rehulzretouch
Автор

Bhai you're teaching skill is very good

gamingmonster
Автор

perfectly explained.... i got exactly what i needed... many thanks :)

vetrikopola
Автор

Apke to bhaii billions of subscriber hone chahiye


You are so great
APKI wjh se me python itni acchi trh seekh gya ki me apne school ke comluter teacher ko sikha skta hu

Thank you so much

Harry bhai
Apne mujhe sikha diya

May you gotta millions Got millions of subscriber as soon as possible😊😊😊💐💐👍👌

rajkumarsingh
Автор

Thanku Harry bhai best course for python❤️

dushyanttyagi