回答編集履歴
4
修正
test
CHANGED
@@ -7,11 +7,3 @@
|
|
7
7
|
lst = [[*i[:2], 1, *i[3:]] for i in lst]
|
8
8
|
|
9
9
|
````list`という言葉は、Pythonの標準関数名なので変数名に使わない方がよいです。
|
10
|
-
|
11
|
-
手っ取り早く最後の配列を作るなら
|
12
|
-
|
13
|
-
```Python
|
14
|
-
|
15
|
-
lst = [['', '', 1, '']*5]*5
|
16
|
-
|
17
|
-
```
|
3
修正
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
```Python
|
4
4
|
|
5
|
-
lst = [['' for _ in range(4)] for _in range(5)]
|
5
|
+
lst = [['' for _ in range(4)] for _ in range(5)]
|
6
6
|
|
7
7
|
lst = [[*i[:2], 1, *i[3:]] for i in lst]
|
8
8
|
|
2
修正
test
CHANGED
@@ -2,8 +2,16 @@
|
|
2
2
|
|
3
3
|
```Python
|
4
4
|
|
5
|
-
lst = [['' for _ in range(4)] for
|
5
|
+
lst = [['' for _ in range(4)] for _in range(5)]
|
6
6
|
|
7
7
|
lst = [[*i[:2], 1, *i[3:]] for i in lst]
|
8
8
|
|
9
9
|
````list`という言葉は、Pythonの標準関数名なので変数名に使わない方がよいです。
|
10
|
+
|
11
|
+
手っ取り早く最後の配列を作るなら
|
12
|
+
|
13
|
+
```Python
|
14
|
+
|
15
|
+
lst = [['', '', 1, '']*5]*5
|
16
|
+
|
17
|
+
```
|
1
修正
test
CHANGED
@@ -6,4 +6,4 @@
|
|
6
6
|
|
7
7
|
lst = [[*i[:2], 1, *i[3:]] for i in lst]
|
8
8
|
|
9
|
-
```
|
9
|
+
````list`という言葉は、Pythonの標準関数名なので変数名に使わない方がよいです。
|