Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akshayxarora/4f645cf91f23d859eecbee8d2ab8243d to your computer and use it in GitHub Desktop.
Save akshayxarora/4f645cf91f23d859eecbee8d2ab8243d to your computer and use it in GitHub Desktop.
palindrome
str = raw_input("Enter the string to be checked ")
if (str[::1])==(str[::-1]):
print "Palindrome"
else:
print "Not a palindrome"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment