You are viewing a single comment's thread. Return to all comments →
Not to be picky, but for map(function, iterable, ...), the argument iterable can be any object capable of returning its members one at a time, not just lists. For example, map(lambda x:x*x, range(10)) yields an iterable of the first ten perfect squares.
map(function, iterable, ...)
map(lambda x:x*x, range(10))
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
Not to be picky, but for
map(function, iterable, ...)
, the argument iterable can be any object capable of returning its members one at a time, not just lists. For example,map(lambda x:x*x, range(10))
yields an iterable of the first ten perfect squares.