[python] 실전에서 유용한 표준 라이브러리
·
코딩테스트/코딩테스트를 위한 정리
1. 내장함수 : 기본 입출력, 정렬1) sum()2) min().max()3) eval() :식을 계산해서 나타냄 4) sorted() : 리스트 정렬 2. intertools : 반복되는 형태의 데이터를 처리 ex)순열,조합1) 순열 : 서로 다른 n개에서 서로 다른 r개를 택하여 일렬로 나열from itertools import permutationsdata = ['A','B','C']result = list(permutations(data,3))print(result) 2) 조합 : 서로 다른 n개에서 순서 상관없이 서로 다른 r개 선from itertools import combinationsdata = ['A','B','C']result = list(combinations(data,2))p..