Python ProgrammingPython Programming

How do I check if there are duplicates in a flat list?

Check Duplicates

thelist = [1, 2, 3, 4, 4, 5, 5, 6, 1]

print(len(thelist) != len(set(thelist)))
True