📅  最后修改于: 2022-03-11 14:45:55.627000             🧑  作者: Mango
list = [1, 2, 3, 4, 5]
list.remove(0) #removes element in specified position
print(list)
>> [2, 3, 4, 5]
list.discard(2) #discards element if found in iterable (in list in this case) ;)
print(list)
>> [3, 4, 5]