let's say I have a list
list1 = [0,0,0,0,0,0,1,0 ,0,0,0,0,1,1,1, 0,0,0,1,0]
now I have another list
list2 = [5,9,10]
What I am trying to do is check the value of each index in list2, for that index in list1
i.e.
list2, index(0), is 5, I want to check the value of the index(5) in list1
I was thinking a for loop with an if loop inside it, but I'm not sure how to call the corresponding index in the first list
list1 = [0,0,0,0,0,0,1,0 ,0,0,0,0,1,1,1, 0,0,0,1,0]
now I have another list
list2 = [5,9,10]
What I am trying to do is check the value of each index in list2, for that index in list1
i.e.
list2, index(0), is 5, I want to check the value of the index(5) in list1
I was thinking a for loop with an if loop inside it, but I'm not sure how to call the corresponding index in the first list
Comment