回答編集履歴
4
ファイル名生成処理変更
test
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
```python
|
2
2
|
|
3
|
-
f
|
3
|
+
for i in range(100):
|
4
4
|
|
5
|
-
|
5
|
+
with open(f"file{i}.txt") as lines:
|
6
6
|
|
7
|
-
with open(filename) as lines:
|
8
|
-
|
9
|
-
xy = [[*map(
|
7
|
+
xy = [[*map(int, line.split())] for line in lines]
|
10
8
|
|
11
9
|
x, y = zip(*xy)
|
12
10
|
|
3
intをfloatに変更
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
with open(filename) as lines:
|
8
8
|
|
9
|
-
xy = [[*map(
|
9
|
+
xy = [[*map(float, line.split())] for line in lines]
|
10
10
|
|
11
11
|
x, y = zip(*xy)
|
12
12
|
|
2
中間結果のmapをリストにする
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
with open(filename) as lines:
|
8
8
|
|
9
|
-
xy = [map(int, line.split()) for line in lines]
|
9
|
+
xy = [[*map(int, line.split())] for line in lines]
|
10
10
|
|
11
11
|
x, y = zip(*xy)
|
12
12
|
|
1
言語をPythonに変更
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
```py
|
1
|
+
```python
|
2
2
|
|
3
3
|
filenames = [f'file{i}.txt' for i in range(100)]
|
4
4
|
|