Tutorials - Reuven M. Lerner: Comprehending comprehensions

Comprehensions are one of the most important - and misunderstood - parts of Python. In this tutorial, I'll walk you through comprehensions, including how to write them, and why you would want to do so. By the time you finish this tutorial, you'll fully understand list, set and dict comprehensions, as well as nested comprehensions and generator expressions. You'll understand the differences between regular "for" loops and comprehensions, and where to use them.

Пікірлер: 11

  • @HermannWinter
    @HermannWinter2 ай бұрын

    This talk is a gold mine for every ambitious Python developer. Well done 👍

  • @5037digg
    @5037digg11 ай бұрын

    Absolutely wonderful presentation. I now understand comprehensions in a fundamental way rather than just mechanical application. Reuven demonstrates that comprehensions are, indeed, "magical".

  • @ReuvenLerner

    @ReuvenLerner

    10 ай бұрын

    I'm so glad to know that you enjoyed it!

  • 3 ай бұрын

    Thanks for this great lesson. The only remark I'd like to share is that the first nested list comprehension example could have been implemented using just the sum function instead of employing nested list comprehensions. I'm simply presenting this alternative approach here for those who are following along with this lesson. result = sum(sum(number) for number in mylist) Cheers!

  • @anabelberumen
    @anabelberumen6 ай бұрын

    vi todo el video y fue muy esclarecedor, en verdad muchísimas gracias.😁

  • @adamkorzonek7830
    @adamkorzonek7830 Жыл бұрын

    Great job thank you for explanation how nested comprehensions works

  • @thepackbot
    @thepackbot Жыл бұрын

    Fantastic tutorial!

  • @bewilderedlearningevolving
    @bewilderedlearningevolving Жыл бұрын

    Always mean to get around to comprehending comprehensions

  • @anabelberumen
    @anabelberumen6 ай бұрын

    thank you.

  • @shivayshakti6575
    @shivayshakti65758 ай бұрын

    Wonderful presentation Reuven, I was wondering why didnt you use google colab, any downsides to that while presenting?

  • @ReuvenLerner

    @ReuvenLerner

    3 ай бұрын

    I find colab to be slow and out-of-date, Python-wise. So I prefer to run things locally and share in almost-real time with my courses. But you're not wrong that Colab can also work!

Келесі