안녕하세요! daily_D 입니다! 👩🏻💻 오늘은 Python itertools 로 순열과 조합을 이용해보는 방법과 직접 구현하는 방법에 대해 알아볼까요? ➤ 순열 ( = permutations) : n 개의 원소에서 중복을 허용하지 않고 r개를 뽑아서 나열 직접구현 def permutations(array, r): for i in range(len(array)): if r == 1: yield [array[i]] else: for next in permutations(array[:i] + array[i+1:], r-1): yield [array[i]] + next itertools 사용 from itertools import permutations for i in permutations([1, 2, ..