map() function returns a list of the results after applying the given function to each item of a given iterable (list, tuple etc.)
map(fun, iter)
fun : It is a function to which map passes each element of given iterable.
iter : It is a iterable which is to be mapped.
Calculate the length of each word in the tuple:
def myfunc(n):
return len(n)
x = map(myfunc, ('apple', 'banana', 'cherry'))
print(list(x))
[5, 6, 6]