check if argument is null python code example
Example 1: check if array is empty python
a = []
if not a:
print("List is empty")
Example 2: check if variable is empty python
if variable:
# code goes here...
a = []
if not a:
print("List is empty")
if variable:
# code goes here...