def list_replace(a_list, old, new):
    """
    Replaces every `old` item in `a_list` with `new` item
    """
    for i, item in enumerate(a_list):
        if item == old:
            a_list[i] = new
