From 4a8b33dc2b7c9baeba047ba59ca82cf777baf8c7 Mon Sep 17 00:00:00 2001 From: ism16 <30345278+ism16@users.noreply.github.com> Date: Wed, 15 Jul 2020 02:06:13 -0700 Subject: [PATCH] [XXXX] - Complete is_palindrome function in order to get is a strins is palindorme or not --- src/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 86f3f66..bfe4a60 100644 --- a/src/main.py +++ b/src/main.py @@ -14,8 +14,12 @@ def is_palindrome(palindrome): - # Start coding here - pass + palindrome = palindrome.replace(' ', '').lower() + if palindrome == palindrome[::-1]: + return True + else: + return False + def validate(): for palindrome in PALINDROMES: