d = {'a': [1], 'b': [1, 2], 'c': [], 'd':[]} d = {k:v for k,v in d.items() if type(v) == list and len(v)>0} print(d)
Output:
{'a': [1], 'b': [1, 2]}