What is the most efficient way to check if a list contains only empty values (not if the list is empty, but a list of empty elements)? I use the cool python implicit booleaness method in a for loop:
def checkEmpty(lst):
for element in lst:
if element:
return False
break
else:
return True
Anything better?
source
share