[Python] 파이썬 함수 그리고 람다 함수
1. 파이썬에서 함수의 기본 사용법 def print_hello_world(): print("hello world") def plus(a, b): return a + b print_hello_world() >>> hello world a = plus(5, 4) a >>> 9 2. 파이썬에서 합수는 객체이다. (일급객체란?) 따하서 함수를 호출 할 때 함수를 넘길 수 있다. >>> def add(a,b): ... return a + b ... >>> def calculate(func, arg1, arg2): ... print('calulation: ', func.__name__) ... print('result: ', func(arg1,arg2)) ... >>> calculate(add, 4, 6) #ad..