Last active
March 23, 2018 16:14
-
-
Save VhMuzini/2423eebb41401e9938d21c21449ee443 to your computer and use it in GitHub Desktop.
Simple python fuction for test if a string is palindrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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