From 0b823b61b0251838ad001a586ab0f675cc25836d Mon Sep 17 00:00:00 2001 From: Carlos Vargas Date: Tue, 28 Jul 2020 02:38:37 -0500 Subject: [PATCH] Solucion al reto --- src/main.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 86f3f66..13ef1ba 100644 --- a/src/main.py +++ b/src/main.py @@ -15,7 +15,22 @@ def is_palindrome(palindrome): # Start coding here - pass + + #First remove the Mayus and Minus + palindrome = palindrome.casefold() + + #Then i need to remove the spaces in the string + palindrome = palindrome.replace(" ","") + + #And the string is ready to be reversed + reverse = palindrome[::-1] + + if reverse == palindrome: + #print(palindrome, reverse) + return True + else: + return False + def validate(): for palindrome in PALINDROMES: