in the expression, any(not (i % 6) for i in range(1, 10))
does the any()
argument not (i % 6) for i in range(1, 10)
defines a generator or a list ?
For the moment I understand that in:
g = (not (i % 6) for i in range(1, 10))
g
is a generator
and in :
l = [not (i % 6) for i in range(1, 10)]
l
is a list
But as we don't invoke any
with []
or ()
, like in any([not (i % 6) for i in range(1, 10)])
or any((not (i % 6) for i in range(1, 10)))
I'm confused...