๋ฐ์ํ
Notice
Recent Posts
Recent Comments
Link
| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- boj
- ์๊ณ ๋ฆฌ์ฆ
- ์ฝํ
- BFS
- SW์ญ๋ํ ์คํธ
- ํ๋ก๊ทธ๋๋จธ์ค
- ๋ค์ด๋๋ฏนํ๋ก๊ทธ๋๋ฐ
- Blind
- ์นด์นด์ค
- SWEA
- ์ผ์ฑ
- ์ฝ๋ฉํ ์คํธ
- ๊ทธ๋ํ
- ์คํ
- DP
- sort
- ํํ
- algorithm
- ์ธํผ
- ์์ ํ์
- DFS
- SSAFY
- ํ์ด์ฌ
- ์๋ฐ์คํฌ๋ฆฝํธ
- ์๋ฃ๊ตฌ์กฐ
- kakao
- Backjoon
- javascript
- Python
- ๋ฐฑ์ค
Archives
- Today
- Total
๋ง์ํ
[python] 'input.txt'๋ก input ๋ฐ๊ธฐ ( feat.sys ) ๋ณธ๋ฌธ
Programming language/Python
[python] 'input.txt'๋ก input ๋ฐ๊ธฐ ( feat.sys )
deo2kim 2020. 9. 7. 20:41๋ฐ์ํ

๐ ํ์ผ์ ์ฝ์ด์ input ๊ฐ์ ๋ฐ์๋ณด์
ctrl+c, ctrl+v ๋ ์ด์ ๊ทธ๋ง
๐ต์ฌ์ฉ๋ฒ
import sys
sys.stdin = open('input.txt')
for i in range(5):
print(sys.stdin.readline())
input.txt:
2
4
40 30 30 50
15
1 21 3 4 5 35 5 4 3 5 98 21 14 17 32
๐ต๊ฒฐ๊ณผ
2
4
40 30 30 50
15
1 21 3 4 5 35 5 4 3 5 98 21 14 17 32
๋ฐ์ํ
'Programming language > Python' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [python] ์งํฉ ์๋ฃํ set() (0) | 2020.09.08 |
|---|---|
| [python] F-String (0) | 2020.09.06 |
| [python] filter (2) | 2020.08.31 |
| [python] accumulate(itertools), ๋์ ํฉ (0) | 2020.08.30 |
| [python] defaultdict (0) | 2020.08.29 |