leetcode217 python3 72ms 存在重复元素

class Solution:
    def containsDuplicate(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        s = set()
        for i in nums:
            if i in s:
                return True
            else:
                s.add(i)
        
        return False
            
        
posted @ 2018-08-08 16:25  一条图图犬  阅读(184)  评论(0编辑  收藏  举报