Answer to Question #231038 in Python for umesh

Question #231038

Compare Last Three Characters

Write a program to check if the last three characters in the two given strings are the same.

Input

The first and second lines of inputs are strings.

Output

The output should be either

True or False.Explanation

Given strings are

apple, pimple. In both the strings, the last three characters ple are common. So the output should be

True


1
Expert's answer
2021-08-30T01:36:31-0400
firstString = input()[-3:]
secondString = input()[-3:]
print(firstString==secondString)
    

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
APPROVED BY CLIENTS