Python program to check that a list have elements in it or not .
Python program to check that a list have elements in it or not. Code - -------------------------------- # Python program to check that a list have elements in it or not . list2 = [ "anant" , "shiv" , "hariom" , "utsav" , "shorya" , "ajay" , "carry" , "harry" ] def element_absence_checker (list): a = input ( "Enter the name of element which you want to check:- " ) for i in list: if i == a: print ( "Element present in list.." ) break else : print ( "Element doesn't present in list." ) element_absence_checker(list2)