回答編集履歴
1
追記
answer
CHANGED
@@ -19,4 +19,28 @@
|
|
19
19
|
```
|
20
20
|
|
21
21
|
実行例
|
22
|
-

|
22
|
+

|
23
|
+
|
24
|
+
追記:
|
25
|
+
for python2
|
26
|
+
```python
|
27
|
+
import sys
|
28
|
+
|
29
|
+
start_pos = 4
|
30
|
+
empty_lines = 4
|
31
|
+
|
32
|
+
count = 0
|
33
|
+
while True:
|
34
|
+
line = sys.stdin.readline()
|
35
|
+
if line == '':
|
36
|
+
break
|
37
|
+
|
38
|
+
count += 1
|
39
|
+
sys.stdout.write(line)
|
40
|
+
if count == start_pos:
|
41
|
+
for x in range(empty_lines):
|
42
|
+
```
|
43
|
+
|
44
|
+
参考情報
|
45
|
+
Python Tips:改行なしで文字列を出力したい
|
46
|
+
[https://www.lifewithpython.com/2013/12/python-print-without-.html](https://www.lifewithpython.com/2013/12/python-print-without-.html)
|