at <at at tuko.nl> writes: > I have a lot times the following code: > > for x in [-2, -1, 0, 1, 2, 3, 4]: > if x > 0: > ... more code... Use: for x in (x in [-2, -1, 0, 1, 2, 3, 4] if x > 0): ... more code ...