I have a list with integers, in which every second int is zero (0), like this:
mylist = [1,0,2,0,3,0,4,0]
I can only check single positions like so:
for i in range(0, len(mylist)):
if i in mylist:
#do something here
I am trying to check for two positions at every loop, so if the loop finds for example "2, 0" in mylist, it will be able to remove those two ints.
Any suggestion will be appreciated.