remove()从左到右寻找,移除找到的第一个指定元素,举个例子:

1 a = ["hello", "world", "world", "dlrb"]
2 a.remove("world")
3 print(a)

输出结果:

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
['hello', 'world', 'dlrb']

从左到右寻找,只移出找到的第一个world

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄