mapping a method to a list?

Tim Hochberg tim.hochberg at ieee.org
Wed Aug 8 15:52:36 EDT 2001


<gyromagnetic at excite.com> wrote in message
news:3b7193b8.137917594 at 127.0.0.1...
> Thank you all for the suggestions.
>
> I was aware of the list comprehesions solution. In fact, I almost put
> that in my note as one way I knew of to solve the problem. That type
> of solution would certainly suffice for the example I gave. I guess I
> was looking for some more general information about the capabilities
> of map.
>
> The solution using the lambda form that Just and Steve suggested was,
> I guess, what I was looking for. However, I thought there might be
> some special symbol prepended to the method that would indicate that
> the method was to be applied to each of the items in the list;  I
> chose the (apparently confusing) symbol '?'.
>
> -Brad





More information about the Python-list mailing list