# to check if the list is empty use len(l) or not l = [] if len(l)==0: print("list is empty") #or if not l: print("list is empty")