goblin2986 goblin2986 - 8 months ago 27
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):