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