view raw
goblin2986 goblin2986 - 9 months ago 35
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):