class Solution(object):
    def containsDuplicate(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        dict={}
        for i in nums:
            if i not in dict:
                dict[i]=1
            else:
                return True
        return False
s = Solution()
nums =[1,2,3,1]
print(s.containsDuplicate(nums))
