목록전체 글 (17)
Be Data
파이썬 Collections 모듈
보호되어 있는 글입니다.
IT/python
2022. 10. 29. 00:54
코테 보기 직전
보호되어 있는 글입니다.
IT/python
2022. 10. 29. 00:51
[파이썬 모듈] 리스트의 모든 조합 구하는 방법
리스트의 모든 조합 구하는 방법에는 3가지가 있음 product permutations combinations 하나의 리스트에서 모든 조합을 구할 때, permutations, combinations 사용 from itertools import permutations from itertools import combinations items = ['a','b','c'] list(permutations(items,2)) # [('a','b'),('a','c'),('b','a'),('b','c'),('c,'a'),('c'..
IT/python
2022. 9. 21. 12:52