Practice ยท 1 of 4
Squares, One Line
Implement squares(n) that returns the squares of 1..n as a list, using a list comprehension (no append, no loop variable bookkeeping).
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Comprehension Drills