About 51 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 arguments are pa...

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

    Oct 13, 2016 · Therefore, in Python 2, separate functions are required to create an iterator rather than a list, such as imap for map (although they're not quite equivalent), xrange for range, izip for zip. By …

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

    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 all you're going to do is iterate over this …

  4. 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?

  5. Why do i get <map object at 0x0389DCD0> when using map

    Jan 3, 2019 · Because map returns a map object, not a list: "Make an iterator that computes the function using arguments from each of the iterables. Stops when the shortest iterable is exhausted."

  6. What is `<map object at 0x02937190>` on python lambda function …

    Oct 7, 2020 · As you know Python is an object-oriented language. The output from lambda is stored as an object at that particular memory location. To print the output, you need to specify a datatype. Let's …

  7. python - Getting attribute error: 'map' object has no attribute 'sort ...

    Oct 18, 2015 · In python 3 map doesn't return a list. Instead, it returns an iterator object and since sort is an attribute of list object, you're getting an attribute error. If you ...

  8. python map() on zipped object - Stack Overflow

    Dec 1, 2016 · python map () on zipped object Asked 9 years, 2 months ago Modified 7 years, 1 month ago Viewed 21k times

  9. python - Error: 'List' object is not callable in map () function ...

    Apr 24, 2018 · Error: 'List' object is not callable in map () function Asked 7 years, 9 months ago Modified 2 years, 5 months ago Viewed 26k times

  10. How to print map object with Python 3? - Stack Overflow

    Jun 9, 2017 · for i in F_temps: print(F_temps) <map object at 0x7f9aa050ff28> <map object at 0x7f9aa050ff28> <map object at 0x7f9aa050ff28> <map object at 0x7f9aa050ff28> I am not sure but …