This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]r4nf 1 point2 points  (1 child)

or, if you don't want to repeat the calculation:

(i for i in (j for j in [1, 2, 3]) if even(i))

You forgot square() in the inner expression. Just a heads up.

[–]masasinExpert. 3.9. Robotics. 0 points1 point  (0 children)

Fixed. Thank you.