brewersfan1976

ch2-ex8.py

Jul 3rd, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. userInput = raw_input("Please enter a sentence:")
  2. print
  3.  
  4. if (userInput == userInput[::-1]):
  5.     print "The string is a palindrome"
  6. else:
  7.     print "The string is not a palindrome"
Advertisement
Add Comment
Please, Sign In to add comment