Hello, i really need some help, im new to python so having a bit of trouble.
i have two arrays which i successfully pulled out from some data. i want to search these arrays for 2 number and when they appear i want their index.
no matter how many different ways i try this, it just wont work, i keep getting errors. why does python not like this?
i have two arrays which i successfully pulled out from some data. i want to search these arrays for 2 number and when they appear i want their index.
Code:
>>> arrF = [3,4,5,6,7,8,9] >>> arrid=[0,0,0,1,0,0,0] >>> def indexOfObjectinFrame2(frame,arrF,arrID,id): ... for i in arrF: ... if arrF[i] == frame: ... if arrid [i] == id: ... print i ... else: ... print -1
Comment