python while array is not empty code example
Example 1: check if array is empty python
a = []
if not a:
print("List is empty")
Example 2: check if empty item in list python
if '' in list:
# do stuff
a = []
if not a:
print("List is empty")
if '' in list:
# do stuff