Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- text = raw_input("Please enter a word: ")
- neg = text[::-1]
- if text == neg:
- print "This is a Palindrome"
- else:
- print "This is NOT a Palindrome"
- while True:
- repeat = raw_input("Do you want to restart? (y/n): ")
- if repeat in ('y', 'n'):
- break
- print "invalid input"
- if repeat == 'y':
- continue
- else:
- print "Goodbye"
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement