Python: Lambda, Map, Filter, Reduce Functions

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 261

  • @yongkyosunim
    @yongkyosunim 5 років тому +18

    Finally, someone who actually explained this quite elegantly and simply.

  • @tecolote8566
    @tecolote8566 8 місяців тому +2

    EXCELENTE: GOOD EXPLANATION. BETTER THAN MY TEACHER, AT COLLEGE.

  • @mulengamulenga5449
    @mulengamulenga5449 Рік тому +2

    Wow ... that's so simplified!!! I finally got someone who me me see all of them at once in a simplified manner along with how they can be used together. Thanx Joe!!!

  • @alexyuwen
    @alexyuwen 4 роки тому +16

    Small mistake at 5:20, the map function would only work if square was defined as
    def square(num):
    return num**2
    since the parameter would need to be a number, not a list.

    • @onemanenclave
      @onemanenclave 2 роки тому +3

      That approach was meant to be equivalent to the _whole_ thing on the right, not just to the lambda function ;)

    • @juliuskamara1348
      @juliuskamara1348 2 роки тому

      def square(lst1=[]):

    • @gregoryogunna9527
      @gregoryogunna9527 Рік тому

      ​@@juliuskamara1348didn't work

  • @ashfaqtunio1311
    @ashfaqtunio1311 8 років тому +95

    This is great. I always found these functions confusing, but you have explained them so clearly, I am going to use them extensively in my coding. Thanks a lot.

    • @fatimak6440
      @fatimak6440 5 років тому

      bhali karay ayo

    • @tsalt
      @tsalt 3 роки тому

      same, great video!

  • @Armadurapersonal
    @Armadurapersonal Рік тому +3

    I have an interview coming and needed a refresher. Thank you.

  • @jorgeespinoza3938
    @jorgeespinoza3938 4 роки тому +4

    I"ve seen many videos about this topic, but this is, BY FAR, the BEST. Not only the pace was the adecuate fir beginners like me, but it was also full of examples and alternatives. Thanks for publishing this video. Thumbs up thumbs ☝!!

  • @tariqa8962
    @tariqa8962 4 роки тому

    I took this lesson in a paid online course and didn't make any sense. I watched this video and it's crystal clear now.
    Thank you Sir!

  • @afterhours39
    @afterhours39 4 роки тому +1

    Subbed. Don't know why UA-cam hasn't brought me to your channel before. Your explanation helped me understand three functions (two of which I hadn't even heard of) that I didn't understand before. Thank you.

  • @tomekklewicki9221
    @tomekklewicki9221 4 роки тому +1

    This is gold. I have been doing codewars tasks for a while now, painstainkingly writing each lines for conditions. I wiish I found this earlier!

  • @ionichi
    @ionichi 5 років тому +1

    Excellent; very helpful. Thank you so much.
    Finally, a presenter who doesn't start every sentence with "so" or "".

  • @prasadfalke376
    @prasadfalke376 4 роки тому +5

    Joe, you just helped me understand Lambda and other functions. This will be the easiest explanation I have seen so far. (a week into Python programming)

  • @rahulkmail
    @rahulkmail 4 роки тому +6

    Simply awesome. The way it has been explained.

  • @meebsrashid4090
    @meebsrashid4090 3 роки тому +3

    this is easiest way to teach complex method...Thank You!!!

  • @daniel_english4u
    @daniel_english4u 10 місяців тому +1

    Very clear and precise explanation that anyone should be able understand.

  • @ms310
    @ms310 4 роки тому +2

    Great concise video, this was the first video that I found using python3

  • @rmalshe
    @rmalshe 8 років тому +1

    This extremely simple lesson can save one hundreds of lines of coding. Thanks for creating it!

    • @TasX
      @TasX 2 роки тому +1

      Is this actually useful? I feel like you could do the same, even faster and more optimized with a simple numpy package

  • @shiningcopper
    @shiningcopper 4 роки тому +7

    so easy to follow, great job!
    for the last part: i think the code needs to be updated and import functools
    import functools
    print(functools.reduce(lambda x,y:x*y,n))

  • @mau_lopez
    @mau_lopez 6 років тому +13

    At last, an excellent and concise explanation of this functions, loved this clip ! Thanks

  • @newsbie-thekidsnewsstop1811
    @newsbie-thekidsnewsstop1811 5 років тому +3

    One of the most effective lessons I have seen!

  • @fallingintofilm
    @fallingintofilm 4 роки тому +2

    At 5:00 you can’t use the square function with map there. Since map takes on element from the list a time, and then applies the square function to it, *but* the square function is written to deal with an entire list not a single element.

  • @upendrauppi5778
    @upendrauppi5778 7 років тому +9

    lot of confusion regarding comprehensions,lambda,map functions~!today i got clarity !!thk u so much!!!

  • @SpiritAwakening0
    @SpiritAwakening0 4 роки тому +1

    Thanks for the video! I was confused on lambda and this video explained them really well.

  • @claylanzino9749
    @claylanzino9749 2 роки тому +1

    Thanks for sharing Joe, very clear and didactics your explanation.

  • @suacasa293
    @suacasa293 5 років тому +1

    Thanks a lot from Brazil! I always found them very confusing, now I am happy with this learning experience!

  • @katehsu3642
    @katehsu3642 2 роки тому +1

    thank you, so clear. I love the visuals

  • @rikschoonbeek
    @rikschoonbeek 7 років тому +1

    Well explained! I started learning Python 4 days ago on Treehouse, but still, with this explanation I managed to make my first lambda functions work in one go.

    • @15tefera
      @15tefera 7 років тому +1

      4 days eh?

  • @sushantregmi2126
    @sushantregmi2126 5 років тому +2

    Thanks for clarifying these so eloquently. Loved it.

  • @DileepKumarMB
    @DileepKumarMB 4 роки тому +1

    Neat and clear explanation with good example.

  • @rogerdpm
    @rogerdpm 3 роки тому +4

    Thank you for the explanation. Just a correction at 5:24 . You cannot pass the square function as-is to the map along with the list. The map is expecting individual items. Not the list itself.

  • @jk3089
    @jk3089 4 роки тому +3

    Very helpful sir. Hope a lot of students will learn something from it. Regards, love and affection.

  • @AndrewDChristie
    @AndrewDChristie 4 роки тому +1

    helpful video, really explains the lambda concept

  • @Jayanth943
    @Jayanth943 5 років тому +1

    Explanation was outstanding....crisp, clean and clear... Watched some of the videos but i found them vague... Contented after watching this ...cheers ..and Yes...Subscribed 😊

  • @utoobbott8817
    @utoobbott8817 2 роки тому +1

    Very well explained. Thank you.

  • @octave3030
    @octave3030 7 років тому +1

    Very simplified explanation..highly useful..can't thank you enough..outstanding

  • @surajprasad2291
    @surajprasad2291 4 роки тому +1

    Thank you sir for your crystal clear explanation!!

  • @ifadamicah5151
    @ifadamicah5151 5 років тому +1

    This is best video on UA-cam,

  • @vinutabellur
    @vinutabellur Рік тому +1

    you have exaplained in simple english brother. thank you

  • @devijayavel8195
    @devijayavel8195 4 роки тому +1

    That is awesome. simple, neat visually presented.. easily understandable on comparing to traditional functions

  • @zainabzaidi5069
    @zainabzaidi5069 5 років тому +1

    Thanks, u explained elegantly.

  • @subramanianchenniappan4059
    @subramanianchenniappan4059 5 років тому

    Thanks a lot. I am a Java developer. I find this map, filter, reduce concept new. Learnt new thing today 😊😊

  • @krishnakiranvajha3175
    @krishnakiranvajha3175 3 роки тому

    Superb explanation Joe!! I have always confused with Map filter reduce and list comprehension concepts !!! I am very much clear now exactly when to use them.

  • @akmalatkhamov8760
    @akmalatkhamov8760 4 роки тому

    Simple and brief explanation! Thank you very much for your efforts!

  • @helpmenowmark
    @helpmenowmark 6 років тому +1

    Very clear. Thank you for taking the time to enlighten us.

  • @alifiras5651
    @alifiras5651 6 років тому +1

    i watched alot of videos about that functions, i couldn't understand any one of them! except yours, it was awsome!

  • @sm.future_pydev
    @sm.future_pydev 9 місяців тому +1

    that helps so muchhhh!🥳 Thank You!❤

  • @wingoedgy
    @wingoedgy 7 років тому +14

    Your videos are outstanding.

  • @cococnk388
    @cococnk388 Рік тому +2

    Clear explanation

  • @venkateswaraprasad9165
    @venkateswaraprasad9165 2 роки тому

    Very clear explanation thanks jay

  • @MultiDickers
    @MultiDickers 7 років тому +1

    The best Tutorial i have seen so far. well explained and i like the way u relate the subject with other similar operations.

  • @johngrear6506
    @johngrear6506 3 роки тому +1

    Great video, beautiful and clear explanation :-)

  • @ivanfantang3591
    @ivanfantang3591 8 років тому

    nice!, thank you so much, you have better lecture than my professor did!

  • @kamilkurzynowski3836
    @kamilkurzynowski3836 2 роки тому +1

    Word of correction about 3:10 you’re saying that map returns a list. This is not true, it returns an iterator which may or may not be converted into a list. This is why we use list(map(func, [])) to convert a map output to a list.

  • @RandomScientist
    @RandomScientist 4 роки тому +1

    Masha Allah. What a concise explanation. Thank you Brother. May peace be upon you.

  • @amirtaba8600
    @amirtaba8600 4 роки тому +1

    This was very useful. Thank you

  • @rajeshbhagat1812
    @rajeshbhagat1812 6 років тому +1

    Explained in very easy way. Great video!!

  • @rajeshraut2955
    @rajeshraut2955 5 років тому +1

    Great video

  • @rozacek
    @rozacek 7 років тому

    Great video. Very simple and clear explanation. Thanks.

  • @officesuperhero9611
    @officesuperhero9611 6 років тому +1

    Hi Joe, I am late to the party, but this is a very well made video. Super clear and helpful. Thanks.

  • @mehdijb752
    @mehdijb752 6 років тому

    well done man thanks for your clean and simple explanation

  • @photinoman
    @photinoman 7 років тому +4

    so simple and clear, subscribed! Oh, you have a lot more videos!

    • @joejamesusa
      @joejamesusa  7 років тому +1

      +photinoman I have about 90 videos. A third of them are on Python data structures and algorithms

  • @zbng007
    @zbng007 3 роки тому +1

    I like your tutorials ! cheers

  • @leoh3892
    @leoh3892 5 років тому

    Definitely helpful vid, hate reading python docs

  • @ashj1165
    @ashj1165 5 років тому +1

    brief and clear !!! thanks

  • @fet1612
    @fet1612 5 років тому +1

    2:52
    map function

  • @pietrot90
    @pietrot90 6 років тому +1

    Really clear explanation! Thank you so much!

  • @antarikshtyagi
    @antarikshtyagi 5 років тому

    there are syntax problems in the code shown 4:59. it should be print(square([4,3,2,1])). It should be print(map(square,n))

  • @mahfujalam9704
    @mahfujalam9704 6 років тому

    Just easy to ubderstand and really enjoyed. Thanks sir

  • @balakrishnagopalam
    @balakrishnagopalam 6 років тому

    Good Video with simple explanations... n=[10,100,1000,10000] print("Thank You {} Much". list(map(lambda x:(format(" very very ")**2, n))
    ))

  • @WiseFatOwl
    @WiseFatOwl 5 років тому +1

    Thanks! That was simple to understand..

  • @arundas7760
    @arundas7760 4 роки тому +1

    Good work sir

  • @kostasnikoloutsos5172
    @kostasnikoloutsos5172 7 років тому +1

    Thank you sir for this video.Now I understand why they are called anonymous functions:)

  • @HassanBraim
    @HassanBraim 6 років тому

    You make it look easy, Thanks a lot!

  • @ginadi9733
    @ginadi9733 4 роки тому

    Perfect explanation

  • @trin08201
    @trin08201 4 роки тому

    Good explanations. Thanks.

  • @gillianbc
    @gillianbc 7 років тому +1

    Nice clear explanation - thanks

  • @parameshwarir9446
    @parameshwarir9446 7 років тому +4

    Good one for beginners

  • @munyafiction
    @munyafiction 8 років тому

    Woah, so simple! Thanks so much for the video, I think I understand now.

    • @jesse578
      @jesse578 4 роки тому

      your life is so simple!

  • @reginahshikanda6478
    @reginahshikanda6478 Рік тому +1

    This is amazing

  • @myworldAI
    @myworldAI 3 роки тому +1

    Great video👍👍👍👍👍❤❤❤❤💖💖💖💖

  • @deveshgolwalkar3605
    @deveshgolwalkar3605 7 років тому

    thank you Joey for this informative video!!

  • @samnik12345
    @samnik12345 6 років тому +1

    awesome thanks for taking the effort to make this

  • @prafullsharma8029
    @prafullsharma8029 8 років тому

    loved the video...very pellucidly explained...thanks....earlier i skipped the video coz of music :P

  • @_deva
    @_deva 4 роки тому

    wonderful explanation...

  • @JaydeepDe
    @JaydeepDe 8 років тому

    short and sweet. thanks

  • @peatahandy3152
    @peatahandy3152 3 роки тому +1

    Excellent. !!!!!

  • @EpicPlayztrue
    @EpicPlayztrue 6 років тому

    Thanks for this its fluently help me

  • @vedantsgoodlife7302
    @vedantsgoodlife7302 4 роки тому

    that was a real help joe

  • @awaraamin9670
    @awaraamin9670 8 років тому +2

    an informative video! thank you

  • @thelolladorfking2416
    @thelolladorfking2416 6 років тому

    Very well explained.

  • @kaindradjoemena7789
    @kaindradjoemena7789 4 роки тому

    Amazing 🙌

  • @KayYesYouTuber
    @KayYesYouTuber 5 років тому +1

    Nice explanation. Thanks

  • @ygpsk3860
    @ygpsk3860 8 років тому

    thank you. very informative and well explained

  • @Tribunall
    @Tribunall 7 років тому +1

    nums = [4, 3, 2, 1]
    def square(x):
    return x*x
    print([square(num) for num in nums])

    • @ajaybediya7458
      @ajaybediya7458 5 років тому

      Short and easy one:
      nums = [4, 3, 2, 1]
      print([x * x for x in nums])

  • @sampurnap3103
    @sampurnap3103 6 років тому

    Great explanation.... thank you so much

  • @vishnukamalakar4435
    @vishnukamalakar4435 4 роки тому

    Thank you very much ❤🌹😊

  • @ajaymanwani3174
    @ajaymanwani3174 5 років тому

    Great Explanation

  • @chinmayrao3831
    @chinmayrao3831 6 років тому

    Thanks dude it was easily understandable......:)

  • @PioneerBlue
    @PioneerBlue 7 років тому

    Super helpful. Thanks!