This commit is contained in:
rasbt 2014-04-13 19:22:48 -04:00
commit d4c466134d

View File

@ -2,9 +2,9 @@
def palindrome(my_str): def palindrome(my_str):
""" """
Returns True if an input string is a palindrom Returns True if an input string is a palindrome. Else returns False.
""" """
stripped_str = "".join([l.lower() for l in my_str if l.isalpha()]) stripped_str = "".join(l.lower() for l in my_str if l.isalpha())
return stripped_str == stripped_str[::-1] return stripped_str == stripped_str[::-1]
if __name__ == '__main__': if __name__ == '__main__':