def last_continuous_indexes_slice(ol,value):
length = ol.__len__()<EOL>end = None<EOL>slice = []<EOL>for i in range(length-<NUM_LIT:1>,-<NUM_LIT:1>,-<NUM_LIT:1>):<EOL><INDENT>if(ol[i]==value):<EOL><INDENT>end = i<EOL>break<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if(end == None):<EOL><INDENT>return(None)<EOL><DEDENT>else:<EOL><INDENT>slice.append(end)<EOL>for i in range(end-<NUM_LIT:1>,-<NUM_LIT:1>,-<NUM_LIT:1>):<EOL><INDENT>if(ol[i]==value):<EOL><INDENT>slice.append(i)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>slice.reverse()<EOL>return(slice)<EOL>
from elist.elist import *
ol = [1,"a","a",2,3,"a",4,"a","a","a",5]
last_continuous_indexes_slice(ol,"a")