Answers for "palindrome missing alphabet"

0

palindrome missing alphabet

s=input()
a=len(s)
if (s[0]!=s[a-1]):
         print(s[0])
else:
  for i, j in zip(range(0,int(a/2)+1,1), range(a-1,int(a/2)-1,-1)):
    if (s[i]!=s[j]) :
     if (s[i+1]==s[j]):
       print(s[i])
       break
     else:
       print(s[j])
       break
Posted by: Guest on July-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language