How do you make a higher order function in Python?



How do you make a higher order function in Python?..

Answer / chaitanya

A higher-order function accepts one or more functions as input and returns a new function. Sometimes it is required to use function as data

To make high order function , we need to import functools module

The functools.partial() function is used often for high order function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Which is best python or r?

0 Answers  


How to improve performance of this code?

0 Answers  


Is c++ required for learning python?

0 Answers  


What is python encapsulation?

0 Answers  


What will be the output of data[-2] from the list data = [1,5,8,6,9,3,4]?

0 Answers  






Are tuples mutable?

0 Answers  


Is python full stack?

0 Answers  


What is map?

0 Answers  


Since switch-case is not used in python – what are the replacements for switch statement in python?

0 Answers  


What is flask used for in python?

0 Answers  


What are the steps required to make a script executable on Unix?

1 Answers  


Why is python 2 still used?

0 Answers  


Categories