I created a function to evaluate list if they have duplicates or not:
def duplica(list_to_check):
    if len(set(list_to_check)) != len(list_to_check):
        print('there are duplicates inside the list')
        result = 0  
    else:
        result = 1
    
    return result
print(duplica([1, 1, 2]))
##test it:
there are duplicates inside the list 
0
I want to know if there's any alternative way to evaluate the list using a code of only one line (for example lambda or map)
 
    