효율적인 루핑을 위한 이터레이터를 만드는 함수
import itertools
✅순서 o, 중복 o
new_list = list(itertools.product('chu',repeat=2)) for i in range(len(new_list)): print(new_list[i])
✅순서 o, 중복 x
new_list = list(itertools.permutations('chu',2)) for i in range(len(new_list)): print(new_list[i])
✅순서 x, 중복 x
new_list = list(itertools.combinations('chu',2)) for i in range(len(new_list)): print(new_list[i])
✅순서 x, 중복 o
new_list = list(itertools.combinations_with_replacement('chu',2)) for i in range(len(new_list)): print(new_list[i])