def cond_remove_all(ol,**kwargs):
cond_func = kwargs['<STR_LIT>']<EOL>if('<STR_LIT>' in kwargs):<EOL><INDENT>cond_func_args = kwargs['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>cond_func_args = []<EOL><DEDENT>if('<STR_LIT>' in kwargs):<EOL><INDENT>mode = kwargs["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>mode = "<STR_LIT>"<EOL><DEDENT>new = copy.deepcopy(ol)<EOL>selected = find_all(new,cond_func,*cond_func_args)<EOL>selected_indexes = array_map(selected,lambda ele:ele['<STR_LIT:index>'])<EOL>new = pop_indexes(new,selected_indexes)['<STR_LIT:list>']<EOL>if(mode == "<STR_LIT>"):<EOL><INDENT>return(new)<EOL><DEDENT>else:<EOL><INDENT>ol.clear()<EOL>ol.extend(new)<EOL>return(ol)<EOL><DEDENT>
from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
    cond = (ord(str(ele)) > ord(ch))
    return(cond)

new = cond_remove_all(ol,cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt = cond_remove_all(ol,cond_func=afterCH,cond_func_args=['B'],mode='original')
ol
rslt
id(ol)
id(rslt)