Source Code:
(back to article)
squares = [i**2 if i % 2 == 0 else -(i**2) for i in range(10)] print(squares)
Result:
Report an issue