I'm trying to gauge which is more pythonic.
if any( ( ( i % 2 == 0 and i > 4 ) for i in range(10) ) ) :
return
if any( [ ( i % 2 == 0 and i > 4 ) for i in range(10) ] ) :
return
Would the generator expression form short circuit any faster than the list comp?