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)

 

posted @ 2016-12-25 21:05  清源居士  阅读(257)  评论(0编辑  收藏  举报