Chapter 15: List Comprehensions
List comprehensions provide a concise way to create lists.
Example
| Python | |
|---|---|
This creates a list of squares from 0 to 9.
List comprehensions provide a concise way to create lists.
| Python | |
|---|---|
This creates a list of squares from 0 to 9.