Skip to content

Instantly share code, notes, and snippets.

@VhMuzini
Last active March 23, 2018 16:14
Show Gist options
  • Save VhMuzini/2423eebb41401e9938d21c21449ee443 to your computer and use it in GitHub Desktop.
Save VhMuzini/2423eebb41401e9938d21c21449ee443 to your computer and use it in GitHub Desktop.
Simple python fuction for test if a string is palindrome
# Author: Vitor
word = input("Enter your word: ")
if word == word[::-1] or len(word) < 2:
print("Your word IS a palindrome")
else:
print("Your word IS NOT a palindrome")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment