Python変更リストアイテム
アイテム値の変更
特定のアイテムの値を変更するには、インデックス番号を参照してください。例
2番目の項目を変更します。
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
2番目の項目を変更します。
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)