[백준_python] format, map, split || 2739, 2920, 8958
·
🎯PS
FORMATformatformat 포맷팅 : 중괄호 { }를 이용하는 방법 ex) tmp = "{ : d }".format(100) print("int : {0}, string : {1}".format(100, "str") 처럼 변수의 타입과 상관없다%% 포맷팅 : %d, %s, %f 등과 함께 %를 이용하는 방법 ex) print("int : %d, string : %s" %(100, "str")) Mapinput()은 문자열로 입력을 받기 때문에 int(input())처럼 정수로 변환을 해주기도 하는데, split()함수( : 일정 기준으로 나누어 리스트 형태로 변환)와 함께 이용할 때, int(input().split()) (X) map함수를 이용해주며 split의 결과를 모두 해당 타입으로 변환할..