Files
Igor 8623d967f0
CI Check / lint-and-check (push) Failing after 8s
add KR
2026-07-14 23:11:34 +03:00

24 lines
485 B
Python

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"]))