【发布时间】:2021-04-05 14:01:23
【问题描述】:
您好,我想让这段代码工作,我必须打印 eric 赢得的奖品列表,但我收到错误,我不知道如何继续
我的代码
#eric wishlist
eric,car,plane,jet
prize = read_txt("wishlist.txt")
while prize:
p = prize.pop(0)
das = p.split(",")
length = len(das)
score = 0
i = 1
while i < 2:
i += 1
print(das)
所以我弹出第一个以消除 eric 并想打印前 2 个奖品 thar 是汽车、飞机,但它不起作用:(请帮忙。
【问题讨论】:
标签: python python-3.x function while-loop