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)
原文地址:https://www.cnblogs.com/qingyuanjushi/p/6220520.html