如何将多个变量分配给一个GUI输入框?像这样:q1,q2,q3=input()
代码不是这样的,但我希望它是这样的:
a, b, c = str(input("Type in a command"))
但不是这样的:
abc = str(input("Type in a command"))
if abc == str("a"):
print ("a is right")
else:
print ("a is wrong")
if abc == str("b"):
print ("b is right")
else:
print ("b is wrong")
if abc == str("c"):
print ("c is right")
else:
print ("c is wrong")
如果我这样做,我会弄错其中一个,它会告诉我一个是对的,两个是错的。(a错了,b对了,c错了)
目前没有回答
相关问题 更多 >
编程相关推荐