0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fileinput — 標準入力でデータ件数が分からない複数データの入力

Last updated at Posted at 2017-08-11

import fileinput
for line in fileinput.input(): #3,4,5
>>if line == "\n":
>>>>break

>>else:
>>>>a, b, c = map(int, line.split(","))
print(a, b, c) #3 4 5

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?