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 are the use of sets in python?

465


What is the difference between list and tuples in python?

454


What is the best notepad?

445


Do lists start at 0 or 1 java?

482


What does float () do in python?

460






What is the main use of python?

442


What is the difference between a function and a method python?

429


As python is more suitable for the server-side application, it is very important to have threading implemented in your server code. How can you achieve that in python?

458


How will you reverse a list?

496


What is final and super keyword difference between them?

489


What is setup script?

437


In Python what is slicing?

517


Write a small code to explain repr() in python ?

492


Why is used in python?

457


What is tkiner?

476