
Conclusion
- This is a function that is called by another function, rather than being called directly.
- A function is passed as a parameter, and the received function is called and used.
Example)
def callback_func(func):
for i in range(5):
func(i)
def print_hello(num):
print('hello', num)
callback_func(print_hello)
References https://coding-yesung.tistory.com/20