mapping a method to a list?
gyromagnetic at excite.com
gyromagnetic at excite.com
Wed Aug 8 15:48:39 EDT 2001
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