x = lambda : 6
print(x()) # prints -> 6
어떠한 계산없이 그냥값을 넘겨줌
https://stackoverflow.com/questions/43807953/empty-parameter-for-python-lambda-function
Empty Parameter for Python Lambda Function
Is it possible in python to write a lambda function that does not need any parameters passed to it? For instance, is there a way to translate this function: def file_opener(): f = open('filena...
stackoverflow.com
https://www.askpython.com/python/python-lambda-anonymous-function
Python lambda - Anonymous Function - AskPython
Python lambda functions are also called an anonymous function. They don't have any name. Python lambda function examples with map(), filter(), and reduce().
www.askpython.com
'시행착오 > [python]' 카테고리의 다른 글
[Python] Python 심볼릭 링크 설정 (0) | 2021.08.31 |
---|---|
[python] dictionary(딕셔너리)의 clear(), {} 차이 (0) | 2021.05.20 |
[python] 파이썬 daemon 데몬 만들기 (0) | 2021.05.06 |
[python] 로컬 및 원격 서버내 파일/디렉토리 존재 확인법 (0) | 2021.05.04 |
[python] filter 함수 사용시 주의할 점 - iterator (0) | 2021.04.21 |