함수 permutations list()

Jmnote (토론 | 기여)님의 2018년 12월 9일 (일) 15:08 판

1 Python

import itertools
lst = list(itertools.permutations([1,2,3],2))
print( lst )
# [(1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)]

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}