Jun-21-2018, 06:11 PM
I got this code:
Got this error
Traceback (most recent call last):
File "E:/aero/python/circle.py", line 7, in <module>
if b[i]==0:
IndexError: list index out of range
import numpy as np a=np.zeros(1000) b=list(a) b.append(1) c=[] for i in range(len(b)): if b[i]==0: del b[i] #print(i) c=bPurpose is to delete all zeroes, so there must be only '1' at the end.
Got this error
Traceback (most recent call last):
File "E:/aero/python/circle.py", line 7, in <module>
if b[i]==0:
IndexError: list index out of range