| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- import re
- 코딩
- 코딩테스트
- join
- collections
- 코테
- 완전탐색
- counter
- 프로그래머스
- cte
- 조합
- coding test
- tableau
- Growth hacking
- level4
- lambda
- itertools
- time complexity
- sql
- AARRR
- 파이썬
- LeetCode
- Level2
- Queue
- programmers
- python
- mysql
- coding
- Stack
- lv4
Archives
- Today
- Total
목록cycle (1)
ror_coding
[Python] Permutations, Combination, Product (Itertools)
from itertools importpermutations (순열)combinations (조합)product (주어진 반복 가능한 객체(iterable)들로 만들 수 있는 모든 조합 반환)cycle from itertools import permutations as perm # 순열from itertools import combinations as comb # 조합from itertools import product # 모든 가능한 조합from itertools import cycle for p in perm(data): # 순열. (모든 경우의 수)for c in comb(data, 3): # 3개씩 조합.# productl = [(x, -x) for x in numbers] # [(4, -4), ..
Coding Test/Python
2024. 12. 4. 14:59