def insert(ol,start_index,ele,**kwargs):
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>length = ol.__len__()<EOL>cpol = copy.deepcopy(ol)<EOL>si = uniform_index(start_index,length)<EOL>new = copy.deepcopy(cpol[<NUM_LIT:0>:si])<EOL>new.append(ele)<EOL>new.extend(cpol[si:])<EOL>return(new)<EOL><DEDENT>else:<EOL><INDENT>ol.insert(start_index,ele)<EOL>return(ol)<EOL><DEDENT>
from elist.elist import *
ol = [1,2,3,4]
ele = 5
id(ol)
insert(ol,2,ele,mode="original")
ol
id(ol)
####
ol = [1,2,3,4]
ele = 5
id(ol)
new = insert(ol,2,ele)
new
id(new)