Created
April 9, 2020 16:53
-
-
Save roman-on/3f1b82f22a54a7b4cc1d952cd9642e1a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| """ | |
| Write a program that receives a string from the user and prints 'OK' if it is Plindrome, otherwise 'NOT'. | |
| Instructions | |
| Plindrome is a string (word, number, or any sequence of characters) whose right-to-left reading is the same as reading from left to right. pay attention: | |
| No small or large letters are important. | |
| Spaces ignored. | |
| Do not use loops. | |
| """ | |
| # sun , bob , Borrow or rob | |
| # NOT OK OK | |
| word = input("Enter a word:").lower() | |
| if word.replace(" ", "") == word[::-1].replace(" ", ""): | |
| print("OK") | |
| else: | |
| print("NOT") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment