Parameters of Python anonymous function

def make_fun (n):

return lambda x:x+n

f=make_fun (15)
print (f (5)
Please see the above code. What"s going on in the anonymous function? it doesn"t pass a parameter, and the code can run. The final output is 20

.

you can think of lambda as a dynamic function, and x is the argument (independent variable) of this function.
make_fun (15) is equivalent to returning a function of def fun (x): return x < 15 . Call this function, pass 5 as a parameter, and return 5 "15" 20

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31261-4d40d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31261-4d40d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?