temp = input("输入要判断的字符串(按q 或者 Q 退出):")
while temp != 'q' and temp != 'Q':
length = len(temp)
flag = 1
for i in range(0,length):
if temp[i] != temp[i * -1 - 1]:
flag = 0
break
if flag == 0:
print(temp,"不是")
else:
print(temp,"是")
temp = input("再玩一次:")
if temp == 'q' or temp == 'Q':
print('用户退出')