1. input().split()


mylist = input().split() # 1 2 3
# mylist = ['1', '2', '3']
print(mylist) # ['1', '2', '3']

문자열로 입력되어, 리스트로 반환된 값

2. input().split()

x, y = input().split() # 1 2
# x = '1' , y = '2'
print(type(x)) # <class 'str'>
print(x) # 1
print(type(y)) # <class 'str'>
print(y) # 1

이렇게 문자열로 입력하고, 리스트로 반환한 것을 각각의 변수로 할당 가능

3. map(int, input().split())

x, y = map(int, input().split()) # 1 2
# x = 1, y = 2
print(type(x)) # <class 'int'>
print(x) # 1
print(type(y)) # <class 'int'>
print(y) # 1

map 함수를 이용하여서 int 함수를 입력한 결과( input().split() )에 적용

map 함수는 map 객체를 반환하고, 이를 언패킹(unpacking)이라는 과정을 통해 x, y로 할당

4. list(map(int, input().split()))

test = list(map( int, input().split() ))
print(test)
print(type(test))