Maru Kun

14%
Flag icon
A list comprehension allows you to generate this same list in just one line of code. A list comprehension combines the for loop and the creation of new elements into one line, and automatically appends each new element.
Python Crash Course: A Hands-On, Project-Based Introduction to Programming
Rate this book
Clear rating