def remove_first(ol,value,**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 = copy.deepcopy(ol)<EOL>new.remove(value)<EOL>return(new)<EOL><DEDENT>else:<EOL><INDENT>ol.remove(value)<EOL>return(ol)<EOL><DEDENT>
from elist.jprint import pobj
from elist.elist import *
ol = [1,'a',3,'a',5,'a']
id(ol)
new = remove_first(ol,'a')
ol
new
id(ol)
id(new)
####
ol = [1,'a',3,'a',5,'a']
id(ol)
rslt = remove_first(ol,'a',mode="original")
ol
rslt
id(ol)
id(rslt)
####array_remove is the same as remove_first