temp = input('请输入:')请输入:666if temp == 'Yes'or'yes': print("if 执行了")else: print("else 执行了")# 666先于‘Yes’进行ASCII比较,结果为False,False再与‘yes’进行or运算,输出为‘yes’,因此if语句执行完之后输出存在,所以执行if程序块的输出。比较完成后执行print(‘if执行了!’)