from itertools import combinations_with_replacement data = [1,2,3] print(list(combinations_with_replacement(data, 3))) [(1, 1, 1), (1, 1, 2), (1, 1, 3), (1, 2, 2), (1, 2, 3), (1, 3, 3), (2, 2, 2), (.....
파이썬 itertools - permutation, combination, product, Combination_with_replacement 사용법, 정의에 대한 요약내용입니다.
자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.