def pop_range(ol,start_index,end_index,**kwargs):
length = ol.__len__()<EOL>start_index = uniform_index(start_index,length)<EOL>end_index = uniform_index(end_index,length)<EOL>if('<STR_LIT>' in kwargs):<EOL><INDENT>mode = kwargs["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>mode = "<STR_LIT>"<EOL><DEDENT>if(mode == "<STR_LIT>"):<EOL><INDENT>cpol = copy.deepcopy(ol)<EOL>new = []<EOL>popped = []<EOL>for i in range(<NUM_LIT:0>,start_index):<EOL><INDENT>new.append(cpol[i])<EOL><DEDENT>for i in range(start_index,end_index):<EOL><INDENT>popped.append(cpol[i])<EOL><DEDENT>for i in range(end_index,length):<EOL><INDENT>new.append(cpol[i])<EOL><DEDENT>return({'<STR_LIT>':popped,'<STR_LIT:list>':new})<EOL><DEDENT>else:<EOL><INDENT>tmp = []<EOL>popped = []<EOL>for i in range(<NUM_LIT:0>,start_index):<EOL><INDENT>tmp.append(ol[i])<EOL><DEDENT>for i in range(start_index,end_index):<EOL><INDENT>popped.append(ol[i])<EOL><DEDENT>for i in range(end_index,length):<EOL><INDENT>tmp.append(ol[i])<EOL><DEDENT>ol.clear()<EOL>for i in range(<NUM_LIT:0>,tmp.__len__()):<EOL><INDENT>ol.append(tmp[i])<EOL><DEDENT>return(popped)<EOL><DEDENT>
from elist.jprint import pobj
from elist.elist import *
ol = [1,2,3,4,5,6]
id(ol)
rslt = pop_range(ol,2,4)
ol
id(ol)
id(rslt['list'])
####
ol = [1,2,3,4,5,6]
id(ol)
rslt = pop_range(ol,2,4,mode="original")
rslt
ol
id(ol)