[python] How to delete an item in a list if it exists?