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