Answer to Question #219098 in Python for Hari nadh babu

Question #219098

Compare Last Three Characters


This Program name is Compare Last Three Characters. Write a Python program Compare Last Three Characters, it has two test cases


The below link contains Compare Last Three Characters - question, explanation and test cases


https://drive.google.com/file/d/1_oj4CCIYU5X0VuwscEnUwUGfWxN53Psq/view?usp=sharing


We need exact output when the code was run

1
Expert's answer
2021-07-20T17:05:29-0400
def cmp(a:str, b:str) -> bool:
    return a[-1] == b[-1] and a[-2] == b[-2] and a[-3] == b[-3]
    
def main():
    print(cmp(input(), input()))

if __name__ == '__main__':
    main()

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