Reupload (purge)

This commit is contained in:
gauvainboiche
2026-08-04 16:42:35 +02:00
commit bb74ba5173
1023 changed files with 79600 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""
An isogram is a word that has no repeating letters, consecutive or non-consecutive. Implement a function that determines whether a string that contains only letters is an isogram. Assume the empty string is an isogram. Ignore letter case.
Example: (Input --> Output)
"Dermatoglyphics" --> true
"aba" --> false
"moOse" --> false (ignore letter case)
"""
def is_isogram(string):
string = string.lower()
for letter in string:
if string.count(letter) > 1:
return False
return True
# Solution la plus opti
def is_isogram(string):
return len(string) == len(set(string.lower()))