map(): applying a function to each item in an iterable in Python
The map() function applies a function to each item in an iterable. Dictionaries, lists, and tuples are examples of iterables. The first argument is the function name, the second argument is the iterable. Let’s calculate the cubic of each number…