9 lines
268 B
Python
9 lines
268 B
Python
def reverse(string):
|
|
"""Reverse a string."""
|
|
return "".join(reversed(string))
|
|
|
|
def ispalindrome(string):
|
|
"""Return True for a palindrome, False otherwise."""
|
|
processed_content = string.lower()
|
|
return processed_content == reverse(processed_content)
|