def index_which(ol,value,which):
length = ol.__len__()<EOL>seq = -<NUM_LIT:1><EOL>for i in range(<NUM_LIT:0>,length):<EOL><INDENT>if(value == ol[i]):<EOL><INDENT>seq = seq + <NUM_LIT:1><EOL>if(seq == which):<EOL><INDENT>return(i)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return(None)<EOL>
from elist.elist import *
ol = [1,'a',3,'a',4,'a',5]
index_which(ol,'a',0)
index_which(ol,'a',1)
index_which(ol,'a',2)
index_which(ol,'a',3) == None