Skip to content

Instantly share code, notes, and snippets.

@greg-hellings
Created October 10, 2022 16:13
Show Gist options
  • Save greg-hellings/1281ef6efb7cf3772a6366ab169fd745 to your computer and use it in GitHub Desktop.
Save greg-hellings/1281ef6efb7cf3772a6366ab169fd745 to your computer and use it in GitHub Desktop.
def palindrome(word: str) -> bool:
for x in range(0, len(word)):
if word[x] != word[len(word)-1-x]:
return False
return True
print(palindrome("racecar"))
print(palindrome("bird"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment