Map and Filter lists with List Comprehensions in Python

preview_player
Показать описание
A big part of our work as programmers, is to take a list And convert it to a new list. The code for this requires a new list to be created and each element added to it in a loop. But after typing that code a thousand times you wonder: Isn’t there a better way to do this? And there is! In this video you learn how list comprehensions replace the verbose code with a one liner in Python!

C H A P T E R S
0:10 Traditional code to convert lists
0:45 List comprehension to double numbers in a list
1:30 List comprehensions to filter lists

M Y O N L I N E T R A I N I N G

#listcomprehensions in #python
Рекомендации по теме
Комментарии
Автор

Did you mean "Learn" in the video title?

I came here to see if you had anything to say about using .map() and .filter() instead of list comprehension. As in "leaning" to them rather than LC.

Then I realized you had typo. 😅

Could you fix that? No worries. Happens to the best of us.

rito_ghosh
visit shbcf.ru