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
🎓Like my style of teaching? Try free chapters of online courses: https://pythonforeveryone.com
#listcomprehensions in #python