use all()
:
all(value == 0 for value in your_dict.values())
all
returns True
if all elements of the given iterable are true.
use all()
:
all(value == 0 for value in your_dict.values())
all
returns True
if all elements of the given iterable are true.