def pop(ol,index,**kwargs):
index = uniform_index(index,ol.__len__())<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>new = copy.deepcopy(ol)<EOL>popped = new.pop(index)<EOL>return({'<STR_LIT>':popped,'<STR_LIT:list>':new})<EOL><DEDENT>else:<EOL><INDENT>popped = ol.pop(index)<EOL>return(popped)<EOL><DEDENT>
from elist.jprint import pobj
from elist.elist import *
ol = [1,2,3,4]
id(ol)
rslt = pop(ol,2)
pobj(rslt)
ol
id(ol)
id(rslt['list'])
####
ol = [1,2,3,4]
id(ol)
rslt = pop(ol,2,mode="original")
rslt
ol
id(ol)