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

How will you remove a duplicate element from a list?

1 Answers  


What does __ name __ mean in python?

1 Answers  


Is r easier than python?

1 Answers  


How to send a object and its value to the garbage collection?

1 Answers  


Is integer immutable in python?

1 Answers  


What is data type set in python and how to work with it?

1 Answers  


Is Python a compiled language or an interpreted language?

2 Answers  


What do you understand by monkey patching in python?

1 Answers  


Should I learn c before python?

1 Answers  


What do you think is the output of the following code fragment?

1 Answers  


How do you write a simple code in python?

1 Answers  


What are the differences in the deep and shallow copy?

1 Answers  


Categories