Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Completely Empty by kazuki.h
def completely_empty(val):
t = type(val)
if val == "" or val == []:
return True
if t is dict:
return completely_empty(list(val.keys()))
if t in (str, int) or val == None:
return False
try:
return all([completely_empty(v) for v in val])
except TypeError:
return False
Oct. 22, 2020