
Sept. 26, 2007
9:57 p.m.
On 9/26/07, Terry Jones <terry@jon.es> wrote:
What's the most compact way to repeatedly call a function on a list without accumulating the results?
While I can accumulate results via
a = [f(x) for x in mylist]
or with a generator, there doesn't seem to be a way to do this without accumulating the results. I guess I need to either use the above and ignore the result, or use
for x in mylist: f(x)
Just use this. Simple, readable. No need to get fancy. -- Adam Olsen, aka Rhamphoryncus