📜  python代码示例中的discard方法

📅  最后修改于: 2022-03-11 14:45:28.335000             🧑  作者: Mango

代码示例1
# the discard method removes the element from the set (a list or somthing else
# as long as its mutable) only if it is found in it.
list_a = [10, 30, 78, 10, 82, 66, 10]
print(list_a.discard(10))
# output: list_a = [30, 78, 82, 66]