为什么它总是只打印升序
if choose=="A" or "a":
print("Ascending order: " ,Anewlist)
elif choose=="D" or "d":
print("Descending order: " ,Dnewlist)
elif choose=="B" or "b":
print("Ascending order: " ,Anewlist)
print("Descending order: " ,Dnewlist)
else:
print("try again")
Tags:
您还需要在
or
命令的另一端指定相等性测试:或者,将
choose
变量设为大写:您应该使用:
或:
相关问题 更多 >
编程相关推荐