本人使用Python:
s = input() print('yes') if s == s[::-1] else print('no')
结果只对了一半,后来发现和以前做过的一道题一样, 是数据出了问题(可能有多余的字符),使用strip方法就能解决:
s = input().strip()