goblin2986 goblin2986 - 10 months ago 39
Python Question

how to check whether list contains only None in python


is there a function that checks whether list l contains only None or not?


If you mean, to check if the list l contains only None,

if all(x is None for x in l):