list comprehension lambda code example
Example 1: list comprehenstsion using lambda funcion
[(lambda x: x*x)(x) for x in range(10)]
Example 2: Creating lambda expressions in comprehension list
lambdas_list = [ (lambda a: lambda: a.some_var)(o) for o in obj_list ]