From 3b928dda413d8636915abde1d21e500272122823 Mon Sep 17 00:00:00 2001 From: Demianzx <39254733+Demianzx@users.noreply.github.com> Date: Thu, 2 Jul 2020 11:55:45 -0500 Subject: [PATCH 1/2] Update main.py --- src/main.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 86f3f66..f824faf 100644 --- a/src/main.py +++ b/src/main.py @@ -14,7 +14,21 @@ def is_palindrome(palindrome): - # Start coding here + # Start coding here + simpleword= [] + reverseword= [] + for char in palindrome: + if char != ' ': + simpleword.append(char.lower()) + print(simpleword) + for char in reversed(simpleword): + reverseword.append(char) + print(reverseword) + + if simpleword == reverseword: + return True + else: + return False pass def validate(): From 57d198dde690ecfc26a713f3ba54577f19edfd32 Mon Sep 17 00:00:00 2001 From: Demianzx <39254733+Demianzx@users.noreply.github.com> Date: Thu, 2 Jul 2020 11:57:36 -0500 Subject: [PATCH 2/2] Update main.py --- src/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index f824faf..4892559 100644 --- a/src/main.py +++ b/src/main.py @@ -13,8 +13,7 @@ ] -def is_palindrome(palindrome): - # Start coding here +def is_palindrome(palindrome): simpleword= [] reverseword= [] for char in palindrome: