brewersfan1976

ch2-ex9.py

Jul 3rd, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. userInput = raw_input("Please enter a sentence:")
  2. print
  3. for w in userInput.split():
  4.     if (w == w[::-1]):
  5.         print w, "is a palindrome"
Advertisement
Add Comment
Please, Sign In to add comment