python: how to delete a given item if it exist in the list a.remove('b') if thing in some_list: some_list.remove(thing)