Skip to content

Commit a01cfd2

Browse files
authored
docs: add docstring to palindrome function
Renamed function to is_palindrome and updated docstring.
1 parent 3c88735 commit a01cfd2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

strings/palindrome.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ def is_palindrome(s: str) -> bool:
3737
return True
3838

3939

40-
def is_palindrome_traversal(s: str) -> bool:
41-
"""
42-
Return True if s is a palindrome otherwise return False.
40+
def is_palindrome(s: str) -> bool:
41+
"""Check whether a given string is a palindrome."""
4342

4443
>>> all(is_palindrome_traversal(key) is value for key, value in test_data.items())
4544
True

0 commit comments

Comments
 (0)