add KR
CI Check / lint-and-check (push) Failing after 8s

This commit is contained in:
Igor
2026-07-14 23:11:34 +03:00
parent da02f5305a
commit 8623d967f0
5 changed files with 115 additions and 75 deletions
+23
View File
@@ -0,0 +1,23 @@
def clean_word(word):
words = word.lower()
wordss = words.replace(" ", "")
return wordss
def is_palindrome(word):
wolds = clean_word(word)
if wolds == wolds[::-1]:
return True
def filter_palindromes(words_list):
my_list = []
for words in words_list:
if is_palindrome(words) is True:
my_list.append(words)
else:
continue
return my_list
print(filter_palindromes(["gfdfhfhdh", "fsadfdagfadg", "asa"]))