输入一个字符串,判断是否头尾对应的。比如字符串'abcba'就是头尾对应的。比如字符串'+-**-+',也是头尾对应的。比如字符串'abcbb'就不是头尾对应的。
输入格式:
输入一个字符串
输出格式:
如果头尾对应,输出'yes' 否则输出'no'
输入样例:
abcba
输出样例:
yes
s1=input() if s1==s1[::-1]: print('yes') else: print('no')
输入一个字符串,判断是否头尾对应的。比如字符串'abcba'就是头尾对应的。比如字符串'+-**-+',也是头尾对应的。比如字符串'abcbb'就不是头尾对应的。
输入一个字符串
如果头尾对应,输出'yes' 否则输出'no'
abcba
yes
s1=input() if s1==s1[::-1]: print('yes') else: print('no')