# def cal(x): # return x+1 # res=cal(10) # print(res) fun = lambda x:x+1 # x performs computation operations x+1 anonymous functions perform computation operations directly without defining a function print (fun(10))
name= ' cat ' # name='dog'name followed by dog # def change_name(x): # return name+'dog'# The function must return a value # print(change_name(name)) # #Anonymous function f= lambda x:name+ ' dog ' print (f(name))