回答編集履歴
2
f
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
with open('TextB.txt') as f:
|
10
10
|
|
11
|
-
lines = a.splitlines() # 改行で分割する。
|
11
|
+
lines = f.read().splitlines() # 改行で分割する。
|
12
12
|
|
13
13
|
text = ' '.join(lines) # 空白で結合する。
|
14
14
|
|
1
d
test
CHANGED
@@ -8,12 +8,10 @@
|
|
8
8
|
|
9
9
|
with open('TextB.txt') as f:
|
10
10
|
|
11
|
-
|
11
|
+
lines = a.splitlines() # 改行で分割する。
|
12
12
|
|
13
|
-
|
13
|
+
text = ' '.join(lines) # 空白で結合する。
|
14
14
|
|
15
|
-
data += line
|
16
|
-
|
17
|
-
print(
|
15
|
+
print(text)
|
18
16
|
|
19
17
|
```
|