2022-10-19 08:28:58 -07:00

15 lines
388 B
Python

class Phrase:
"""A class to represent phrases."""
def __init__(self, content):
self.content = content
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)