250x250
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
- decode()
- __annotations__
- node.js
- __getitem__
- 파이썬
- 오버라이딩
- fnmatch
- HTML
- locals()
- randrange()
- count()
- zipfile
- CSS
- __len__
- choice()
- __sub__
- discard()
- glob
- View
- Database
- inplace()
- shutil
- MySqlDB
- items()
- JS
- remove()
- shuffle()
- fileinput
- mro()
- MySQL
Archives
- Today
- Total
목록Callback (1)
흰둥이는 코드를 짤 때 짖어 (왈!왈!왈!왈!왈!왈!왈!왈!왈!왈!왈!)
(파이썬) Callback 함수와 Lambda 함수
1. 콜백함수(Callback Function) 직접 호출하는 것이 아닌 다른 함수에 의해 호출되는 함수 In [5]: def callback_func(func): for i in range(5): func() def print_hello(): print('안녕하세요! 파이썬!') In [3]: print_hello() 안녕하세요! 파이썬! In [6]: callback_func(print_hello) 안녕하세요! 파이썬! 안녕하세요! 파이썬! 안녕하세요! 파이썬! 안녕하세요! 파이썬! 안녕하세요! 파이썬! In [12]: def callback_func(func, num): for i in range(num): func(i) def print_hello(num): print('안녕하세요! 파이썬!', ..
파이썬 기초
2023. 3. 9. 13:14