How can I do something like this.
index=[[test1,test2,test3],[test4,test5,test6],[test7,test8,test9]] if test5 is in index: print True
Or perhaps try itertools to unroll the array :-
index=[[test1,test2,test3],[test4,test5,test6],[test7,test8,test9]] if test5 in itertools.chain(*index): print True