6 lines
149 B
Python
6 lines
149 B
Python
# squares.comprehension.py
|
|
# This is not a valid Python module - Don't run it.
|
|
|
|
>>> [n ** 2 for n in range(10)]
|
|
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
|