About 11,900,000 results
Open links in new tab
  1. python - Understanding the map function - Stack Overflow

    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 …

  2. python - How to do multiple arguments to map function where …

    In Python 2, it's necessary to provide the length argument to repeat(), since map() will run until the longest iterator is exhausted in that version of Python, filling in None for all missing values. …

  3. How to use map () to call methods on a list of objects

    Can you explain the use of the lambda function? I thought map passed the elements of the list as parameters to the function. How does the lambda function accept the objects as parameters?

  4. Mapping over values in a python dictionary - Stack Overflow

    Sep 1, 2012 · Mutating Dictionary Values In Place Using Zip And Map Here is how I handle the situation of wanting to mutate the values of a dictionary using map without creating a new data …

  5. Getting a map() to return a list in Python 3.x - Stack Overflow

    list(map(chr,[66,53,0,94])) In Python 3+, many processes that iterate over iterables return iterators themselves. In most cases, this ends up saving memory, and should make things go faster. If …

  6. python - Map list item to function with arguments - Stack Overflow

    Is there any way to map list items to a function along with arguments? I have a list: pages = [p1, p2, p3, p4, p5...] And I have to call function myFunc corresponding to each list elements along …

  7. python - Using the map function - Stack Overflow

    In Python 2, map would apply a function to the values of an iterable and return a list. In Python 3, map returns an iterator that applies the function to the iterated values as you loop over it.

  8. python - Why use the map () function? - Stack Overflow

    Jun 9, 2014 · The developers who made Python obviously put some work into creating the map() function, and they even decided NOT to take it out of 3.0, and instead continue working on it.

  9. dictionary - How to use map and set on Python - Stack Overflow

    Sep 9, 2021 · How to use map and set on Python Asked 4 years, 3 months ago Modified 4 years, 3 months ago Viewed 8k times

  10. Why does map return a map object instead of a list in Python 3?

    Oct 13, 2016 · Converting map() from 2 to 3 might not just be a simple case of sticking a list( ) around it. Guido also says: If the input sequences are not of equal length, map() will stop at …