Dcoder icon

They see me Palindroming @ Dcoder

By Lochard | As a newbie programmer | 7 Jul 2023


Problem: In india there is a puzzle"5 characters my name, reverse- forward is the same." You will be presented with a 5 character String, you have to tell whether it satisfy above puzzle, if yes output "Yes" else "No"

Input: Input is String S of 5 characters.

Output: Print "Yes" if the String S satisfies above constraints, else "No".

Constraints: String length = 5

Sample Input: level

Sample Output: 

Yes

s = input()
print('Yes' if s == s[::-1] else 'No')

How do you rate this article?

2


Lochard
Lochard

20240228 Arrived in the UK for about 2 week. All my fears persist. Some are even getting worse. https://github.com/locharp/asylum_diary/


As a newbie programmer
As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.