Created
May 16, 2020 14:35
-
-
Save showyou/5c586a99648393d6cbd6e78620b9c86a to your computer and use it in GitHub Desktop.
ファイル読み込み
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sys.argvのlenに関しては(本当は良くないけど)今回は割愛 | |
import sys | |
filename = sys.argv[1] | |
with open(filename) as f: | |
lines = f.readlines() | |
cnt = 0 | |
for l in lines: | |
print(cnt, l.rstrip("\n")) | |
cnt += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment