выдаёт:
выстрел по х: 2 выстрел по y: 2 мимо выстрел по х: 1 выстрел по y: 1 убил [1, 10, 10] [10, 10, 1] Traceback (most recent call last): if (shotx==onex[i]) and (shoty==oney[i]): IndexError: list index out of range
onex=[1,1,10,10] oney=[10,1,10,1] t='true' while t: pr=len(onex) shotx=int(input('выстрел по х: ')) shoty=int(input('выстрел по y: ')) for i in range(len(onex)): if (shotx==onex[i]) and (shoty==oney[i]): print('убил') onex.remove(i) oney.remove(i) ##print(onex, oney) if pr==len(onex): print('мимо')