remove()方法将删除指定的项。
删除“banana”:
fruitlist = ["apple", "banana", "cherry"]fruitlist.remove("banana")print(fruitlist)
执行结果:
['apple', 'cherry']