Skip to content

Instantly share code, notes, and snippets.

@pinkpretty
Created September 20, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinkpretty/989131c070cc4591a3147c803015e5fd to your computer and use it in GitHub Desktop.
Save pinkpretty/989131c070cc4591a3147c803015e5fd to your computer and use it in GitHub Desktop.
'''
This is the 6th exercise of practicepython
'''
'''
Exercise (and Solution)
Ask the user for a string and print out whether this string is a palindrome or not.
(A palindrome is a string that reads the same forwards and backwards.)
'''
check = input("Enter a string")
if (check == check[::-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