파이썬 기본 문법 - map과 input(), split()
map(적용시킬 함수, 적용할 값들) map(f, iterable)은 함수(f)와 반복 가능한(iterable) 자료형을 입력으로 받는다. map은 입력받은 자료형의 각 요소를 함수 f가 수행한 결과를 묶어서 돌려주는 함수이다. >>> a = input().split() 10 20 (입력) >>> a ['10', '20'] >>> a = map(int, input().split()) 10 20 (입력) >>> a ['10', '20'] >>> list(a) [10,20] 활용 예시. Baekjoon10430 >>> A,B,C = map(int,input().split()) 5 8 4 (입력) >>>print(A) 5 >>>print(B) 8 >>>print(C) 4