diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9182dcd --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "C:\\Users\\MARIA ANGELICA\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe" +} \ No newline at end of file diff --git a/src/main.py b/src/main.py index 86f3f66..9d3ea23 100644 --- a/src/main.py +++ b/src/main.py @@ -15,6 +15,14 @@ def is_palindrome(palindrome): # Start coding here + palindrome_minus = (palindrome.lower()) + palindrome_remplace = palindrome_minus.replace(' ', '') + palindrome_invertida = palindrome_remplace[::-1] + + if palindrome_remplace == palindrome_invertida: + return True + else: + return False pass def validate():