python check if item in list and remove