代码:
five_digit_number = input('请输入一个五位数:')
five_digit_number_list = list(five_digit_number)
if five_digit_number_list[0] == five_digit_number_list[4] and five_digit_number_list[1] == five_digit_number_list[3]:
print(f'{five_digit_number}是回文数')
else:
print(f'{five_digit_number}不是回文数')
运行结果: