1my_list = list()
2# Check if a list is empty by its length
3if len(my_list) == 0:
4 pass # the list is empty
5# Check if a list is empty by direct comparison (only works for lists)
6if my_list == []:
7 pass # the list is empty
8# Check if a list is empty by its type flexibility **preferred method**
9if not my_list:
10 pass # the list is empty