Python: Lambda, Map, Filter, Reduce Functions

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии •

  • @yongkyosunim
    @yongkyosunim 5 лет назад +18

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

  • @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!

  • @mulengamulenga5449
    @mulengamulenga5449 Год назад +3

    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!!!

  • @Armadurapersonal
    @Armadurapersonal 2 года назад +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 ☝!!

  • @tecolote8566
    @tecolote8566 9 месяцев назад +2

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

  • @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

  • @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!

  • @ionichi
    @ionichi 5 лет назад +1

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

  • @rahulkmail
    @rahulkmail 4 года назад +6

    Simply awesome. The way it has been explained.

  • @afterhours39
    @afterhours39 4 года назад +1

    Subbed. Don't know why RUclips 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.

  • @meebsrashid4090
    @meebsrashid4090 3 года назад +3

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

  • @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)

  • @shamsul262
    @shamsul262 6 дней назад

    I was in quest of some easy to understand learning tutorial and finally got it. Thanks Joe.

  • @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!

  • @daniel_english4u
    @daniel_english4u 11 месяцев назад +1

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

  • @mau_lopez
    @mau_lopez 6 лет назад +13

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

  • @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

  • @upendrauppi5778
    @upendrauppi5778 7 лет назад +9

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

  • @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))

  • @kamilkurzynowski3836
    @kamilkurzynowski3836 3 года назад +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.

  • @newsbie-thekidsnewsstop1811
    @newsbie-thekidsnewsstop1811 6 лет назад +3

    One of the most effective lessons I have seen!

  • @suacasa293
    @suacasa293 5 лет назад +1

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

  • @sushantregmi2126
    @sushantregmi2126 6 лет назад +2

    Thanks for clarifying these so eloquently. Loved it.

  • @SpiritAwakening0
    @SpiritAwakening0 4 года назад +1

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

  • @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.

  • @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.

  • @claylanzino9749
    @claylanzino9749 2 года назад +1

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

  • @octave3030
    @octave3030 7 лет назад +1

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

  • @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.

  • @DileepKumarMB
    @DileepKumarMB 4 года назад +1

    Neat and clear explanation with good example.

  • @jk3089
    @jk3089 4 года назад +3

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

  • @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 😊

  • @katehsu3642
    @katehsu3642 2 года назад +1

    thank you, so clear. I love the visuals

  • @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!

  • @devijayavel8195
    @devijayavel8195 4 года назад +1

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

  • @AndrewDChristie
    @AndrewDChristie 4 года назад +1

    helpful video, really explains the lambda concept

  • @vinutabellur
    @vinutabellur Год назад +1

    you have exaplained in simple english brother. thank you

  • @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.

  • @ifadamicah5151
    @ifadamicah5151 5 лет назад +1

    This is best video on RUclips,

  • @wingoedgy
    @wingoedgy 7 лет назад +14

    Your videos are outstanding.

  • @akmalatkhamov8760
    @akmalatkhamov8760 4 года назад

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

  • @surajprasad2291
    @surajprasad2291 4 года назад +1

    Thank you sir for your crystal clear explanation!!

  • @utoobbott8817
    @utoobbott8817 2 года назад +1

    Very well explained. Thank you.

  • @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.

  • @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

  • @rajeshbhagat1812
    @rajeshbhagat1812 6 лет назад +1

    Explained in very easy way. Great video!!

  • @helpmenowmark
    @helpmenowmark 6 лет назад +1

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

  • @zainabzaidi5069
    @zainabzaidi5069 5 лет назад +1

    Thanks, u explained elegantly.

  • @ivanfantang3591
    @ivanfantang3591 8 лет назад

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

  • @johngrear6506
    @johngrear6506 3 года назад +1

    Great video, beautiful and clear explanation :-)

  • @subramanianchenniappan4059
    @subramanianchenniappan4059 5 лет назад

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

  • @rozacek
    @rozacek 7 лет назад

    Great video. Very simple and clear explanation. Thanks.

  • @mehdijb752
    @mehdijb752 6 лет назад

    well done man thanks for your clean and simple explanation

  • @sm.future_pydev
    @sm.future_pydev 10 месяцев назад +1

    that helps so muchhhh!🥳 Thank You!❤

  • @zbng007
    @zbng007 3 года назад +1

    I like your tutorials ! cheers

  • @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.

  • @amirtaba8600
    @amirtaba8600 4 года назад +1

    This was very useful. Thank you

  • @pietrot90
    @pietrot90 6 лет назад +1

    Really clear explanation! Thank you so much!

  • @RandomScientist
    @RandomScientist 4 года назад +1

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

  • @venkateswaraprasad9165
    @venkateswaraprasad9165 2 года назад

    Very clear explanation thanks jay

  • @leoh3892
    @leoh3892 6 лет назад

    Definitely helpful vid, hate reading python docs

  • @mahfujalam9704
    @mahfujalam9704 6 лет назад

    Just easy to ubderstand and really enjoyed. Thanks sir

  • @WiseFatOwl
    @WiseFatOwl 5 лет назад +1

    Thanks! That was simple to understand..

  • @HassanBraim
    @HassanBraim 6 лет назад

    You make it look easy, Thanks a lot!

  • @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))
    ))

  • @ashj1165
    @ashj1165 5 лет назад +1

    brief and clear !!! thanks

  • @samnik12345
    @samnik12345 6 лет назад +1

    awesome thanks for taking the effort to make this

  • @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!

  • @deveshgolwalkar3605
    @deveshgolwalkar3605 7 лет назад

    thank you Joey for this informative video!!

  • @cococnk388
    @cococnk388 Год назад +2

    Clear explanation

  • @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))

  • @kostasnikoloutsos5172
    @kostasnikoloutsos5172 7 лет назад +1

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

  • @gillianbc
    @gillianbc 7 лет назад +1

    Nice clear explanation - thanks

  • @awaraamin9670
    @awaraamin9670 8 лет назад +2

    an informative video! thank you

  • @mulimotola44
    @mulimotola44 8 лет назад +1

    Best explanation I found on the web! Finally I get it!
    And regarding the intro/outro music, please stop using it, because it just doesn't fit the subject of the video. If this clip was about a shootout between gangsters, then it would make sense to have this music, but not for programming :)

  • @prafullsharma8029
    @prafullsharma8029 8 лет назад

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

  • @arundas7760
    @arundas7760 4 года назад +1

    Good work sir

  • @trin08201
    @trin08201 4 года назад

    Good explanations. Thanks.

  • @parameshwarir9446
    @parameshwarir9446 7 лет назад +4

    Good one for beginners

  • @ygpsk3860
    @ygpsk3860 8 лет назад

    thank you. very informative and well explained

  • @chinmayrao3831
    @chinmayrao3831 6 лет назад

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

  • @sampurnap3103
    @sampurnap3103 6 лет назад

    Great explanation.... thank you so much

  • @EpicPlayztrue
    @EpicPlayztrue 6 лет назад

    Thanks for this its fluently help me

  • @KayYesYouTuber
    @KayYesYouTuber 5 лет назад +1

    Nice explanation. Thanks

  • @thelolladorfking2416
    @thelolladorfking2416 6 лет назад

    Very well explained.

  • @tussharladdha4182
    @tussharladdha4182 5 лет назад +3

    you use map function when you need to pass a function on variables, and use filter when you need to pass a condition on all elements and get the elements which hold true for it

  • @_deva
    @_deva 4 года назад

    wonderful explanation...

  • @ginadi9733
    @ginadi9733 4 года назад

    Perfect explanation

  • @PioneerBlue
    @PioneerBlue 7 лет назад

    Super helpful. Thanks!

  • @charlesity
    @charlesity 7 лет назад +1

    Great video!

  • @myworldAI
    @myworldAI 3 года назад +1

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

  • @rajeshraut2955
    @rajeshraut2955 5 лет назад +1

    Great video

  • @Cloudxxx23
    @Cloudxxx23 Год назад

    8:50 Why 1 is there as an argument (1, len(lst1)) ? Why not other number like 0?

  • @JaydeepDe
    @JaydeepDe 8 лет назад

    short and sweet. thanks

  • @sanjeevkumarr7749
    @sanjeevkumarr7749 6 лет назад +1

    Joe that!s really good !

  • @Turbo329
    @Turbo329 6 лет назад +1

    Superb Video!

  • @soldadopreciso
    @soldadopreciso 4 года назад

    Thanks pal, useful video.