题解 | #判断字符是否唯一#

判断字符是否唯一

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
全部评论

相关推荐

12-27 22:46
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务