题解 | #判断字符是否唯一#
判断字符是否唯一
http://www.nowcoder.com/practice/fb08c63e2c4f4f7dbf41086e46044211
class Solution:
def isUnique(self , str: str) -> bool:
# write code here
for i in str:
if str.count(i)>1:
return False
else:
continue
return True
查看17道真题和解析
