Here is a simple lambda express
var= lambda x: x*x
print(var(4))
simple I store the lambda object to a variable use the var to complete the math.
My question :
How do I create function's that use lambda's as keyworded arguments and uses them properly to preform certain tasks
In this code i get TypeError: 'str' object is not callable
def test1(**kwargs):
for fart in kwargs:
print(fart) #output is == key
fart(4) #fart(4)==TypeError
test1(key=lambda x: x*x)