Python 修改列表项
修改项目值
要更改特定项目的价值,请参考索引号示例
更改第二个项目
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
自己试试 »
更改第二个项目
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
自己试试 »
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]