我有3个选项,我希望用户可以选择(A,B或C)
这是我到目前为止尝试过的代码:
while True:
form = input("Please enter your class:")
if form == ('A', 'B', 'C'):
print("Please continue.")
break
else:
print("Class does not exist, please try again.")
答案 0 :(得分:0)
更改
if form == ('A', 'B', 'C'):
到
if form in ('A', 'B', 'C'):