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?

【Python】スペース区切りで入力された数字を別々にして配列(list)に入れる

Last updated at Posted at 2024-09-12

Pythonでよく使うコードです。

hoge = list(map(int, input().split()))
print(hoge)

実行例

入力
1 2 3 456 78 9 10
出力
[1, 2, 3, 456, 78, 9, 10]
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?