From 371f65a6870f996bd27548a0b904485dcd0c3400 Mon Sep 17 00:00:00 2001 From: pachom Date: Sun, 26 Jul 2020 07:44:09 -0500 Subject: [PATCH] challenge python 01 commit added by pachom --- src/main.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 86f3f66..637bd4f 100644 --- a/src/main.py +++ b/src/main.py @@ -14,8 +14,23 @@ def is_palindrome(palindrome): - # Start coding here - pass + """ + validates that the string palindrome is a + palindrome (it is a word or phrase that + read equal to right and back + + param str palindrome is a word or Phrase + + returns True if the word or phrase is a + palindorme or False if not. + """ + + reversed_letters = palindrome[::-1] + + if reversed_letters.lower().replace(' ','') == palindrome.lower().replace(' ',''): + return True + else: + return False def validate(): for palindrome in PALINDROMES: