判断字符串头尾结构

s1=input()
 
if s1==s1[::-1]:
    print('yes')
else:
    print('no')
原文地址:https://www.cnblogs.com/Deranuid/p/13172846.html