Skip to content

Commit c82d6b3

Browse files
Update palindrome.py
1 parent c3c8ad0 commit c82d6b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strings/palindrome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def is_palindrome_recursive(s: str) -> bool:
6262
>>> all(is_palindrome_recursive(key) is value for key, value in test_data.items())
6363
True
6464
"""
65-
if len(s) <= 2:
65+
if len(s) <= 1:
6666
return True
6767
if s[0] == s[len(s) - 1]:
6868
return is_palindrome_recursive(s[1:-1])

0 commit comments

Comments
 (0)