Learn Python Programming
def sqr(n):
return n ** 2
#Python map() function is used to apply a
function on all the elements of specified iterable
and return map object.
Square all numbers using map()
numbers = (10, 20, 13, 24)
result = map(sqr, numbers)
print(list(result))