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