def some_continuous_indexesnot_slices(ol,value,*seqs):
seqs = list(seqs)<EOL>rslt = []<EOL>length = ol.__len__()<EOL>seq = -<NUM_LIT:1><EOL>cursor = <NUM_LIT:0><EOL>begin = None<EOL>slice = []<EOL>while(cursor < length):<EOL><INDENT>cond1 = not(ol[cursor] == value)<EOL>cond2 = (begin == None)<EOL>if(cond1 & cond2):<EOL><INDENT>begin = cursor<EOL>slice.append(cursor)<EOL><DEDENT>elif(cond1 & (not(cond2))):<EOL><INDENT>slice.append(cursor)<EOL><DEDENT>elif((not(cond1)) & (not(cond2))):<EOL><INDENT>seq = seq + <NUM_LIT:1><EOL>if(seq in seqs):<EOL><INDENT>rslt.append(slice)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT>begin = None<EOL>slice = []<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT>cursor = cursor + <NUM_LIT:1><EOL><DEDENT>if(slice):<EOL><INDENT>seq = seq + <NUM_LIT:1><EOL>if(seq in seqs):<EOL><INDENT>rslt.append(slice)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT>return(rslt)<EOL>
from elist.elist import *
ol = [1,"a","a",2,3,"a",4,"a","a","a",5]
some_continuous_indexesnot_slices(ol,"a",0,2)