0 votes
in Python by
What is the map() function used for in Python?

1 Answer

0 votes
by

The map() function applies a given function to each item of an iterable. It then returns a list of the results. The value returned from the map() function can then be passed on to functions to the likes of the list() and set().

Typically, the given function is the first argument and the iterable is available as the second argument to a map() function. Several tables are given if the function takes in more than one arguments.

Related questions

+1 vote
asked Jan 30, 2022 in Python by sharadyadav1986
0 votes
asked Jan 1, 2021 in Python by SakshiSharma
...