所以我想弄清楚如何讓這個簡單的小程序返回到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