There is also the all
function which does the opposite of what you want, it returns True
if all are True
and False
if any are False
. Therefore you can just do:
not all(l)
There is also the all
function which does the opposite of what you want, it returns True
if all are True
and False
if any are False
. Therefore you can just do:
not all(l)