일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- lambda
- python
- 코테
- 프로그래머스
- 코딩테스트
- hackerrank
- collections
- coding test
- counter
- 코딩
- time complexity
- sql
- tableau
- Level2
- coding
- programmers
- Growth hacking
- Queue
- cte
- level4
- itertools
- AARRR
- join
- lv4
- Stack
- 완전탐색
- 파이썬
- mysql
- 조합
- import re
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