We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8089b2 commit fd77905Copy full SHA for fd77905
isogram/isogram.py
@@ -31,5 +31,9 @@ def is_isogram(string: str) -> bool:
31
:returns: True if the string is an isogram, False otherwise
32
:rtype: bool
33
"""
34
+ # empty string
35
+ if not string:
36
+ return True
37
+
38
letters: list[str] = [char for char in string.lower() if char.isalpha()]
- return len(letters) == set(letters)
39
+ return len(letters) == len(set(letters))
0 commit comments