From 0704f2b81cedc3e8a9ba81bbad8d604c19f43f51 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Sun, 13 Apr 2014 15:54:44 -0400 Subject: [PATCH 1/2] Update palindrome.py --- useful_scripts/palindrome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/useful_scripts/palindrome.py b/useful_scripts/palindrome.py index 003139e..b9c1d6f 100644 --- a/useful_scripts/palindrome.py +++ b/useful_scripts/palindrome.py @@ -2,7 +2,7 @@ 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()]) return stripped_str == stripped_str[::-1] From 871f40675ffbbff7dfe307362e33908bf4b71128 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Sun, 13 Apr 2014 16:26:15 -0400 Subject: [PATCH 2/2] Update palindrome.py --- useful_scripts/palindrome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/useful_scripts/palindrome.py b/useful_scripts/palindrome.py index b9c1d6f..633c5f7 100644 --- a/useful_scripts/palindrome.py +++ b/useful_scripts/palindrome.py @@ -4,7 +4,7 @@ def palindrome(my_str): """ 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] if __name__ == '__main__':