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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章

How to delete local branches of GitExtension

How to delete local branches of GitExtension

Git does not apply deleted files when merging an old branch into the master. How can I tell Git to a

How to Delete Archivelog Using RMAN in Oracle

Ubuntu 添加删除用户 How to Add and Delete Users on Ubuntu 16.04

How to resolve the truncate/drop/delete/join hang issue in ADW