Created
November 15, 2017 05:27
-
-
Save pejantantangguh/67ce23196b103715c69b8a0c8e57794e to your computer and use it in GitHub Desktop.
If statement if input words is palindrom or not
This file contains 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
# Strings are list | |
words = str(input("Type in words that you think is palindrome : ")) | |
palindrome = words[::-1] | |
print (words+" "+palindrome) | |
if words == palindrome: | |
print("Your words is palindrome") | |
else : | |
print("Unfortunately this is not palindrome") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment