Python Program to Check if a List is Empty or Not Using _len_()
# Check If a List is Empty in python Using __len__() # empty list list = [] # Checking whether the list size is equal to 0 if list.__len__() == 0: print('Empty list') else: print('Not Empty list')
Output:
Empty list