This is part of the generalized comprehension syntax. You can also do lazy generator comprehensions.
a = (i for i in range(10) if i % 2 == 0)
print(list(a))
You can omit the parenthesis, and use them in calls which expect an iterable. b = max(i for i in range(0, 10) if i % 2 == 0)
print(b)