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 |
Tags
- 위코드
- HTML
- Coding
- 티스토리챌린지
- listdir
- vscode설치
- 코딩
- 파라미터
- TIL #todayilearn #math #javascript #js #자바스크립트 #절댓값 #최댓값 #랜덤 #random #floor
- CSS #HTML #코드
- VSCode
- phython
- 역사
- LIST
- CSS
- 프로그래밍폰트
- Web
- 오블완
- SSAFY
- 파이썬
- wecode
- django
- comprehension
- 프리워커스
- Python
- dumpdata
- dangerouslySetInnerHTML
- html #css #코딩 #입문 #코딩시작하기 #코딩입문 #파이썬 #자바스크립트 #비전공자 #비전공 #코딩학원
- loaddata
- 싸피
Archives
- Today
- Total
목록evaluation (1)
당신의 친절한 이웃, 코딩맨
#19 Python - lazy evaluation, list comprehension 비교
import time L = [ 1,2,3] def print_iter(iter): for element in iter: print(element) def lazy_return(num): print("sleep 1s") time.sleep(1) return num print("comprehension_list=") comprehension_list = [lazy_return(i) for i in L] #[1,2,3] print_iter(comprehension_list) print("generator_exp=") generator_exp = (lazy_return(i) for i in L) #[]를 ()로 바꿔줌. print_iter(generator_exp) comprehension_list= slee..
Today I Learn (TIL)
2020. 6. 29. 16:32