Created
September 20, 2016 13:58
-
-
Save pinkpretty/989131c070cc4591a3147c803015e5fd to your computer and use it in GitHub Desktop.
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
''' | |
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