Answer:
Define a function that accept a list as an argument. Save the length of the list as a variable and cast the list to a set and also save the length to a variable.
If the result of the subtraction of the set length from the list length is not equal to zero, then the list have duplicates.
Step-by-step explanation:
A sample of the source code using Python,
def list_duplicate( list ):
list_len = len( list )
new_set = set( list )
set_len = len( new_set )
If list_len - set_len != 0 :
Print( " The list has duplicate " )