: 어떤 쌍(pair)를 return 하고 싶을때 combination을 활용하면 쉽게 구할 수 있다.
즉 (A,B)와 (B,A)는 같은 것으로 취급
from itertools import combinations combinations('배열' , '배열 안에서 몇개의 쌍 추출할것인지')
: (A,B)와 (B,A)는 다른 것으로 취급
from itertools import permutations permutations('배열' , '배열 안에서 몇개의 쌍 추출할것인지')