goblin2986 goblin2986 - 4 years ago 172
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?

Answer Source

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

if all(x is None for x in l):
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download