Learn Python LAMBDA in 6 minutes! 🚮

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

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

  • @BroCodez
    @BroCodez  3 месяца назад +3

    # Lambda function = A small anonymous function for a one time use (throw away function)
    # They take any number of arguments, but have only 1 expression
    # Helps keep the namespace clean and is useful with higher-order functions
    # 'sort()', 'map()', 'filter()', 'reduce()'
    # lambda parameters: expression
    double = lambda x: x * 2
    add = lambda x, y: x + y
    max_value = lambda x, y: x if x > y else y
    min_value = lambda x, y: x if x < y else y
    full_name = lambda first, last: first + " " + last
    is_even = lambda x: x % 2 == 0
    age_check = lambda age: True if age >= 18 else False
    print(double(2))
    print(add(3, 4))
    print(max_value(6, 7))
    print(min_value(9, 8))
    print(full_name("Spongebob", "Squarepants"))
    print(is_even(5))
    print(age_check(21))

    • @ShauryaShukla69
      @ShauryaShukla69 3 месяца назад

      can u make django tutorial

    • @saikrishna1525
      @saikrishna1525 3 месяца назад

      Hey Bro.. your videos are crisp, straight and easy to learn… please consider making videos on unit testing… thanks a lot.. god bless you

    • @robert-qn8hy
      @robert-qn8hy 3 месяца назад

      Thanks a lot bro just want i am thinking for . Can you also make a tutorial on Lambda decorators please 😢🙏

  • @CandrewG64
    @CandrewG64 3 месяца назад +1

    Thank you! In masters program now and 1) you've been a life-saver and 2) I have been waiting for this particular video to come out.

  • @shinstorm3473
    @shinstorm3473 3 месяца назад +1

    Thanks Bro you made lambda crystal clear for me. Always look forward to your vids 🎉🎉🎉

  • @GmD.28
    @GmD.28 2 месяца назад

    thank you for the different examples, it helped clarify my questions

  • @GigelBosket
    @GigelBosket 3 месяца назад

    I love your tutorials ,they are very easy to understand compared to others ,but I would like more exercises so I can remember better.

  • @robert-qn8hy
    @robert-qn8hy 3 месяца назад

    Thanks a lot bro . Can you aslo make a video on lambda Decorators in python please .

  • @kapibara2440
    @kapibara2440 3 месяца назад

    Great ❤❤❤

  • @kenner__
    @kenner__ 3 месяца назад +1

    yo, just watched previous vid and this video is out!

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

    bro is great

  • @gurulove2585
    @gurulove2585 3 месяца назад

    i have a query regarding java. i have completed the 12 hour java full course and wanted to know how we can use database and which database we can use to learn for java

  • @26brownie
    @26brownie 3 месяца назад

    Golang please 😊

  • @emptxoxo7425
    @emptxoxo7425 3 месяца назад

    We need Vue tutorial

  • @fusebox9725
    @fusebox9725 3 месяца назад

    Nothing much, hbu?
    I really wish i get hired cuz of ur videos.

  • @hazmatpants
    @hazmatpants Месяц назад

    gordon freeman