【发布时间】:2015-03-05 13:58:54
【问题描述】:
如何在 Python 中只查找和删除列表中的一个元素?
# Example:deleting only the first (1,2) in the list
a = [(4, 5), (1, 2), (7, 5), (1, 2), (5, 2)]
# result expected
a = [(4, 5), (7, 5), (1, 2), (5, 2)]
【问题讨论】:
标签: python list python-2.7