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 |
Is java or python better?
What are different modes in file operations?
What do you understand of pep 8?
What are the disadvantages of python?
What do you understand by mutable and immutable in python?
How do I get a list of all files (and directories) in a given directory in Python?
Tell me how does python handle the memory management?
When is not a good time to use python generators?
Explain garbage collection with python?
What is python encapsulation?
What is the use of globals() function in python?
Which is faster c++ or python?