0

pythonでは、私は好きになります

grid = [['a','b','c'],['d','e','f'],['g','h','i']]
another_grid = [['a','a','a'],['d','e','f'],['g','h','i']]
another_grid[0][1] = grid[1][1]

上記のコードは'a''e'に変更します。c でこれを行う方法は?

4

1 に答える 1

1

構文も似ていますが、同じです。

char grid[3][3] = { { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } };
char another[3][3] = { { 'a', 'a', 'a' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' } };
another[0][1] = grid[1][1];
于 2012-12-16T17:25:45.030 に答える