主页
Python
Python - 更改列表项
demo_list_change2
运行 ❯
×
更改方向
保存代码
更改主题
thislist = ["apple", "banana", "cherry"] thislist[1:2] = ["blackcurrant", "watermelon"] print(thislist)
['apple','blackcurrant','watermelon','cherry']