利用语言优势,一行代码:
class Solution:
    def isUnique(self , str: str) -> bool:
        return len(list(str)) == len(set(list(str)))