I want to validate a list to make sure that there are no duplicate items. My problem is that I don't know how to do this in the if statement. Is there a method or something in python that will return False if there are duplicates in the list?
Here is what I had in mind:
lst = ["1","2","3","3","4"]
if #lst contains no duplicates :
print("success")
else:
print("duplicate found")
Thanks in advance.