method 1:
s == s[::-1]
method 2:
n=len(s) flag=True for i in range(n//2): if(s[i]!=s[n-i-1]): flag=False break i