Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Birthday paradox
- 딱다구리과
- 흰날개해오라기
- keras
- AI역량평가
- python3
- 생일문제
- 계수정렬
- ADsP
- 직박구리과
- 딥러닝 공부
- SimpleCraft
- 참새목
- 맑은소리 스피치학원
- 비둘기목
- 백로과
- 참새과
- 딥러닝공부
- 솔딱새과
- 비둘기과
- IBK기업은행 인턴
- Python
- structured_array
- 한국의새
- 오리과
- AI전략게임
- django
- 한국의 새
- 기러기목
- 가마우지과
Archives
- Today
- Total
목록join() (1)
진박사의 일상
[Python] ''.join() 얼마나 빠를까?
list to string에 사용되는 join 함수가 for-loop보다 얼마나 빠를까 테스트를 해보았다. import time import random str_len = 100 #100자리 랜덤 문자열 str_pool = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" result = [] for_sum = 0.0 join_sum = 0.0 for i in range(str_len): result.append(random.choice(str_pool)) for i in range(100): for i in range(str_len): result.append(random.choice(str_pool)) new_result = "" start = time..
프로그래밍
2021. 9. 4. 12:03