217. 存在重复元素
作者:互联网
class Solution:
def containsDuplicate(self, nums: List[int]) -> bool:
return len(set(nums)) != len(nums)
class Solution:
def containDuplicate(self,nums:List[int]) ->bool:
return len(set(nums)) != len(nums)
标签:217,set,return,nums,重复,self,元素,List,len 来源: https://blog.csdn.net/sinat_37574187/article/details/120606759