Thursday, May 7, 2015

Python Lambda

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 :
  1. >>> (lambda x: x*2)(3)  
  2. 6  
Pretty cool.

No comments:

Post a Comment