Skip to content

Instantly share code, notes, and snippets.

@iswarup
Created June 9, 2018 20:49
Show Gist options
  • Save iswarup/94e43d69e13608b2a7805ec49084439f to your computer and use it in GitHub Desktop.
Save iswarup/94e43d69e13608b2a7805ec49084439f to your computer and use it in GitHub Desktop.
Palindrome test
string=input("Enter a string to check if it is a palindrome: ")
if string[::1] == string[::-1]:
print(string,"is a palindrome.")
else: print(string,"is not a palindrome.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment