DEV Community

loading...

Discussion on: What's your favorite Python idiom?

Collapse
moopet profile image
Ben Sinclair

I like conditions in comprehensions, and I like two-way conditions, so:

[x for y in z if -1 < y < 1]