首页 > 代码库 > python: how to delete a given item if it exist in the list

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)

 

python: how to delete a given item if it exist in the list