Тёмный

Tutorials - Reuven M. Lerner: Comprehending comprehensions 

PyCon US
Подписаться 29 тыс.
Просмотров 6 тыс.
50% 1

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 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@HermannWinter
@HermannWinter 4 месяца назад
This talk is a gold mine for every ambitious Python developer. Well done 👍
@5037digg
@5037digg Год назад
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 Год назад
I'm so glad to know that you enjoyed it!
@anabelberumen
@anabelberumen 8 месяцев назад
vi todo el video y fue muy esclarecedor, en verdad muchísimas gracias.😁
6 месяцев назад
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!
@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
@shivayshakti6575
@shivayshakti6575 10 месяцев назад
Wonderful presentation Reuven, I was wondering why didnt you use google colab, any downsides to that while presenting?
@ReuvenLerner
@ReuvenLerner 5 месяцев назад
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!
@anabelberumen
@anabelberumen 8 месяцев назад
thank you.