Higher-order functions are those functions that either take a function as a parameter or return it as an output. They can be user-defined functions or built-in functions for example map(), filter(), reduce(), etc.
EXAMPLE:
def newfunc(a):
return a*a
x = map(newfunc, (1,2,3,4)) #x is the map object
print(x)
print(set(x))
OUTPUT:
<map object at 0x00000284B9AEADD8>
{16, 1, 4, 9}
In [9]: