Source Code:
(back to article)
squares = [x**2 for x in range(1, 11)] print(squares) # Output [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
Result:
Report an issue