How do you make a higher order function in Python?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static in python?

436


How would you work with numbers other than those in the decimal number system?

486


Do you need __ init __?

471


Why do we need break and continue in python?

479


How do I convert a number to a string?

467






Which package is the fastest form of python?

496


Explain about classes in strings?

492


How is garbage handled in python?

465


Narrate the difference between python arrays and lists.

454


Can python be used for automation?

454


What is difference between input and raw_input?

475


Is tensorflow written in python?

436


What are the rules for global and local variables in python?

460


Which is faster tuple or list?

422


Explain how you can minimize the memcached server outages in your python development?

512