Oct-27-2021, 06:23 AM
(This post was last modified: Oct-27-2021, 06:23 AM by Gribouillis.)
I know almost no Rust but I understand the efforts to make Python resemble the language you like. However, map and filter are not used very often in Python. One would rather write this as
>>> x = range(1, 11) >>> seq = (y for y in (v * v for v in x) if y % 3 == 0) >>> next(seq, None) 9 >>> for v in seq: ... print(v) ... 36 81