Python ALIVE AND DEAD – JosephLoendorf
参考方法:
people = range(1,31)
tempList = list()
timer =1
flag =True
while flag:
for x in people:
if people.index(x)in tempList:
continue
if timer ==9:
tempList.append(people.index(x))
timer =0
if len(people)- len(tempList)==15:
flag =False
break
timer +=1
for x in tempList:
print(x+1,end=" , ")