解答例
1 2 3 4 5 6 7 8 9 |
data = [44,55,1,22,33,44,6,7] data[0] = 0 data1 = [8,9] data = data + data1 del data[1] data2 = [2,3,4] data[2:5] = data2 data.insert(5,5) print(data) |
【実行結果】
1 2 3 4 5 6 7 8 9 |
data = [44,55,1,22,33,44,6,7] data[0] = 0 data1 = [8,9] data = data + data1 del data[1] data2 = [2,3,4] data[2:5] = data2 data.insert(5,5) print(data) |
【実行結果】