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