我想为此添加一个循环:
question = raw_input("Reboot Y/N ")
if len(question) > 0 and question.isalpha():
answer = question.upper()
if answer == "Y":
print "Reboot"
elif answer == "N":
print "Reboot Cancled"
else:
print "/ERROR/"
因此,如果用户输入其他任何内容,则会出现错误并将其发送回问题。