Let\'s say I have a function
def x(): print(20)
Now I want to assign the function to a variable called y, so that if I us
y
lambda should be useful for this case. For example,
create function y=x+1 y=lambda x:x+1
y=lambda x:x+1
call the function y(1) then return 2.
y(1)
2