Python: isogram

This commit is contained in:
Dmitry Kokorin 2021-06-08 14:35:20 +03:00
parent 7cf9d0f24d
commit 6223031c18
4 changed files with 126 additions and 0 deletions

14
python/isogram/isogram.py Normal file
View file

@ -0,0 +1,14 @@
def is_isogram(string):
seen_chars = set()
for ch in string.lower():
if not ch.isalpha():
continue
if ch in seen_chars:
return False
seen_chars.add(ch)
return True