I have a dictionary, which may only have these keys. But there can be 2 keys, for example 'news' and 'coupon' or only 'coupon'. How to check if the dictionary is empty? (The dictionaries below are empty.)
{'news': [], 'ad': [], 'coupon': []}
{'news': [], 'coupon': []}
I wrote the code but it supposed to take only 3 keys:
if data["news"] == [] and data["ad"] == [] and data["coupon"] == []:
print('empty')
How to take not only 3 keys?