我正在尝试允许我的列表检查用户是否拒绝请求, 如果是,它将激活我的if块,允许我邀请另一位客人代替他们。 每次我输入no,而不是激活if块继续打印,我哪里出错了?或者我缺少什么元素?你知道吗
guestllist = ["me","batman","joker","wonder woman","peter rabbit"]
normal = guestllist
guestllist.reverse()
while len(normal):
# print("welome to the party " + guestllist.pop())
result = input("can you come " + guestllist.pop() + "?")
if result == "no":
print(result + " cannot make it")
input("our new guest shall be ")
相关问题 更多 >
编程相关推荐