We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbf0b7c commit 7f0ebc9Copy full SHA for 7f0ebc9
1 file changed
06/tasks/task_26_is_palindrome_sentence.py
@@ -4,4 +4,7 @@ def is_palindrome_sentence(s: str) -> bool:
4
"""
5
Vrátí True, pokud je věta palindrom (ignoruje mezery, interpunkci a velikost písmen).
6
7
+# creates a list consisting only of lowercase letters of the original string
8
+ s_list = [char.lower() for char in s if char.isalpha()]
9
10
+ return s_list == s_list[::-1]
0 commit comments