所以我想弄清楚如何让这个简单的小程序返回到raw_input,如果用户输入其他的东西然后“是”或“否”。转到特定的raw_input()?
a = raw_input("test: ")
while True:
if a == "yes":
print("yeyeye")
break
elif a == "no":
print("nonono")
break
else:
print("yes or no idiot")
这是我到目前为止,我是新的,这很难理解。提前致谢。
把'raw_input' while循环中。 – DavidG