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