def remove(ele, lst):
    """
  remove all occurences of an element from a list
  """
    pops = []
    for i in range(len(lst)):
        if lst[i] == ele: pops.append(i)
    return [lst[i] for i in range(len(lst)) if i not in pops]