class Solution(object):
    def contains_duplicates(self, numbers):
        number_set = set(numbers)
        return len(numbers) != len(number_set)

    def contains_duplicates2(self, numbers):
        """
        :type numbers: list
        :rtype : Boolean
        """

        numbers.sort()
        for i in range(1, len(numbers)):
            if numbers[i] == numbers[i - 1]:
                return True
        
        return False

numbers = [1, 2, 1, 4]
solution = Solution()
print(solution.contains_duplicates(numbers))
