write a python program to print the following output.
sample input1
bew web
sample output1
Yes
sample input2
race care
sample output2
No
line = input()
w1, w2 = line.split()
if len(w1) != len(w2):
print("No")
exit()
for i in range(len(w1)):
if w1[i] != w2[-1-i]:
print("No")
break
else:
print("Yes")
Comments
Leave a comment