Skip to content

Instantly share code, notes, and snippets.

@akionsight
Created December 7, 2020 12:00
Show Gist options
  • Save akionsight/1250de70c835ba593edf2853441249ab to your computer and use it in GitHub Desktop.
Save akionsight/1250de70c835ba593edf2853441249ab to your computer and use it in GitHub Desktop.
Checks for palindromes
def palindrome_checker(word):
reversed_word = word[::-1]
if reversed_word == word:
return True
else:
return False
# print(palindrome_checker('racecar')) -> returns True
# print(palindrome_checker('Joshua')) -> returns False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment