Python

Function as Parameter in Python

A function can also receive another function as parameter. The following example includes the function calculuevalue which takes as parameters l and f. This function calculates for all the values x in the list l the value f (x). function_carre or function_cube are passed in parameters to the function calculuevalue which executes them.




>>>

About the author

admin

Leave a Comment