Python's lambda
Because I don't quite get what and when python's lambda function's can be of any use - I did some research. Then I've found this sleek way of calling one lined function with unnamed parameter :
Pretty cool.
- >>> (lambda x: x*2)(3)
- 6
No comments:
Post a Comment