Skip to content

Instantly share code, notes, and snippets.

@pejantantangguh
Created November 15, 2017 05:27
Show Gist options
  • Save pejantantangguh/67ce23196b103715c69b8a0c8e57794e to your computer and use it in GitHub Desktop.
Save pejantantangguh/67ce23196b103715c69b8a0c8e57794e to your computer and use it in GitHub Desktop.
If statement if input words is palindrom or not
# 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