编辑代码

str1 = input('请输入一个字符串')
str2 = str1[::-1]
if str1 == str2:
    print('Yes')
else:
    print('No')