Yahoo India Web Search

Search results

  1. 6 days ago · The map() function is a built-in function in Python, which applies a given function to each item of iterable (like list, tuple etc.) and returns a list of results or map object. Syntax : map( function, iterable ) Parameters : function: The function which is going to execute for each iterableiterable: A sequence or collection of iterable objects whi

  2. Python’s map() is a built-in function that allows you to process and transform all the items in an iterable without using an explicit for loop, a technique commonly known as mapping. map() is useful when you need to apply a transformation function to each item in an iterable and transform them into a new iterable.

  3. The map() function executes a specified function for each item in an iterable. The item is sent to the function as a parameter.

  4. The map() function returns a map object, which can be easily converted to lists, tuples, etc. Example: Working of map() def square(n): return n*n numbers = (1, 2, 3, 4)

  5. Jun 11, 2012 · The Python 2 documentation says: Built-in Functions: map(function, iterable, ...) Apply function to every item of iterable and return a list of the results. If additional iterable arguments are pa...

  6. Nov 9, 2021 · The map() function (which is a built-in function in Python) is used to apply a function to each item in an iterable (like a Python list or dictionary). It returns a new iterable (a map object) that you can use in other parts of your code.

  7. Aug 3, 2020 · In this tutorial, we’ve learned the different ways of using the map() function in Python. Now you can use map() with your own function, a lambda function, and with any other built-in functions. You can also implement map() with functions that require multiple iterables.