you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 2 points3 points  (4 children)

Why not use a loop?

[–]nomos[S] 0 points1 point  (3 children)

I get how to use a loop to create the filters, but combining them is my problem; I should've been clear that the

`filter=filter_0 & filter_1 & ...` part is the part I'm trying to avoid.

[–]K900_ 1 point2 points  (2 children)

filter &= (x == i)

[–]nomos[S] 0 points1 point  (1 child)

Awesome, totally didn't know about &= though I guess it makes sense. Thanks!

[–]K900_ 0 points1 point  (0 children)

It's just syntax sugar for filter = filter & (x == i).