Python ALIVE AND DEAD – JosephLoendorf
参考方法:
peple =[]
for i in range(1,31):
person ='person%d'%i
peple.append(person)
c =0
max =30
t =0
while max >15:
god =[]
for pe in peple:
c +=1
if c %9==0:
print(c,pe,'离开')
max -=1
god.append(pe)
for pe in god:
peple.remove(pe)
print('留下人员',peple)