Python 更改列表项
更改项目值
要更改特定项目的值,请参阅索引号:实例
更改第二项:
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
亲自试一试 »
更改第二项:
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
亲自试一试 »
