Skip to content

Commit 0c73400

Browse files
Update is_palindrome.py
cleared clutter
1 parent a4b6bd1 commit 0c73400

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

strings/is_palindrome.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def is_palindrome(s: str) -> bool:
1616
# Since punctuation, capitalization, and spaces are often ignored while checking
1717
# palindromes, we first remove them from our string.
1818
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.
19+
# return s == s[::-1] the slicing method
20+
# uses extra spaces we can
21+
# better with iteration method.
2122

2223
end = len(s) // 2
2324
n = len(s)

0 commit comments

Comments
 (0)