We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4b6bd1 commit 0c73400Copy full SHA for 0c73400
strings/is_palindrome.py
@@ -16,8 +16,9 @@ def is_palindrome(s: str) -> bool:
16
# Since punctuation, capitalization, and spaces are often ignored while checking
17
# palindromes, we first remove them from our string.
18
s = "".join(character for character in s.lower() if character.isalnum())
19
- # return s == s[::-1] the slicing method uses extra spaces
20
- # we can do better with iteration method.
+ # return s == s[::-1] the slicing method
+ # uses extra spaces we can
21
+ # better with iteration method.
22
23
end = len(s) // 2
24
n = len(s)
0 commit comments