See also this previous answer which recommends the not keyword
How to check if a list is empty in Python?
It generalizes to more than just lists:
>>> a = ""
>>> not a
True
>>> a = []
>>> not a
True
>>> a = 0
>>> not a
True
>>> a = 0.0
>>> not a
True
>>> a = numpy.array([])
>>> not a
True
Notably, it will not work for “0” as a string because the string does in fact contain something – a character containing “0”. For that you have to convert it to an int:
>>> a = "0"
>>> not a
False
>>> a="0"
>>> not int(a)
True