def containsDuplicate(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        # use set to check duplicate
        return len(nums) != len(set(nums))

        :type nums: List[int]
        :rtype: bool
        
python/217_Contains_Duplicate.py