Python: Checking if a 'Dictionary' is empty - Stack Overflow

PHOTO EMBED

Tue Aug 10 2021 05:04:09 GMT+0000 (Coordinated Universal Time)

Saved by @lahiruaruna

>>> dct = {}
>>> bool(dct)
False
>>> not dct
True
>>>
content_copyCOPY

https://stackoverflow.com/questions/23177439/python-checking-if-a-dictionary-is-empty-doesnt-seem-to-work