7 line python solution


#1

A = “abecbea”
flag=0
for i in range(len(A)):
B=A[:i]+A[i+1:]
if(B==B[::-1]):
flag=1
print(flag)