๐ํ ์ค ์ ๋ ฅ
๐๊ธฐ๋ณธ
x = input()- type :
str
๐ํ ๋ณํ
x = int(input())๐๊ณต๋ฐฑ์ผ๋ก ๊ตฌ๋ถ๋ ๋ฌธ์
a, b, c = input().split()- ์ ๋ ฅ ๋ฐ์ ๋ฐ์ดํฐ์ ๊ฐ์๋ฅผ ์ ํํ ์ ๋ ์ฌ์ฉ (์๋๋ผ๋ฉด ํ๋์ ๋ณ์๋ก ๋ฐ๊ธฐ)
- ํ๋์ ๋ณ์๋ก ๋ฐ์ผ๋ฉด ๊ณต๋ฐฑ์ผ๋ก ๊ตฌ๋ถ๋ ๋ฌธ์๋ฅผ ๊ฐ ์์๋ก ํ
list๊ฐ ๋ง๋ค์ด์ง
๋ฌธ์๋ฅผ ๋ชจ๋ ํ๋ณํ
a, b, c = map(int, input().split())- ์ ๋ ฅ ๋ฐ์ ๋ฐ์ดํฐ์ ๊ฐ์๋ฅผ ์ ํํ ์ ๋ ์ฌ์ฉ (์๋๋ผ๋ฉด ํ๋์ ๋ณ์๋ก ๋ฐ๊ธฐ)
- ํ๋์ ๋ณ์๋ก ๋ฐ์ผ๋ฉด
map๊ฐ์ฒด๊ฐ ๋ง๋ค์ด์ง โlist์ ๊ฐ์ ์๋ฃํ์ผ๋ก ํ๋ณํ
๐๋ฐฐ์ด
ํ : ์ํฐ ์ด : ๋์ด์ฐ๊ธฐ

๐1์ฐจ์ ๋ฐฐ์ด
"""
input
1 2 3 4 5 6 7 8 9 0
"""
arr = list(map(int, input().split()))
# [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]๐๋์ด์ฐ๊ธฐ๋ก ๊ฐ์ด ๊ตฌ๋ถ๋ 2์ฐจ์ ๋ฐฐ์ด
"""
input
0 1 2
3 4 5
6 7 8
"""
n = 3
arr = [list(map(int, input.split())) for _ in range(n)]
# [[0, 1, 2], [3, 4, 5], [6, 7, 8]]๐๋์ด์ฐ๊ธฐ ์๋ 2์ฐจ์ ๋ฐฐ์ด
"""
input
012
345
678
"""
n = 3
arr = [list(map(int, input())) for _ in range(n)]
# [[0, 1, 2], [3, 4, 5], [6, 7, 8]]Output
arr = [[1, 2, 3, 4], [5, 6, 7, 8]] row = len(arr) col = len(arr[0]) for i in range(row): for j in range(col): print(arr[i][j], end=" ") print()๐Result 1 2 3 4 5 6 7 8