Answer to Question #260256 in Python for mike

Question #260256

Don't you find it amazing to discover words and sentences that have the same first and last letter? We just don't usually notice them, so we can try it out by coding out this problem instead! Print out "Yes" if the first and last characters of the given string are the same, and "No" otherwise. It doesn't matter if they're in lowercase or uppercase, as long as it's the same letter, it fits the description.

So, what are you waiting for? Code now!


Input

A line containing a string.

Pop·it·up

Output

A line containing a string.

Yes





1
Expert's answer
2021-11-02T08:53:35-0400
text = input()
if text[0].upper == text[-1].upper:
    print('Yes')
else:
    print('No')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog