Question #215961

data stream - alphxxdida . After reverse - adidaxxhpla. so here x and a doesn't changed it position. How can I do this ?

Input - alphxxdida

Output-4

Expert's answer

s = input()
res = 0
for i in range(len(s)):
	if s[i] == s[-1-i]:
		res += 1
print(res)

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!

LATEST TUTORIALS
APPROVED BY CLIENTS