Write a function to remove a given item from a python list.
[1, 4, 8, 2], 8
def remove_item(lst, item):
    while item in lst:
        lst.remove(item)
    return lst

print(remove_item([1, 4, 8, 2], 8)) # prints [1, 4, 2]