The pythonic way to check if a list
is empty is using the not
operator.
my_list = []
if not my_list:
print("My list is empty!!!")
To check the opposite, if the list is not empty:
my_list = ['amazon', 'microsoft']
if my_list:
print("My list is NOT empty!!!")