These are all fair and good points :)

I really like the idea of writing a function that exhausts an iterator and 
using that. It seems like this should be a part of the itertools package at 
least, maybe called `run`, `do`, or `exhaust`.

```
from itertools import run
run(list2.append(item * 6) for item in list1)
```

I think that this code reads very nicely - "run this expression for each item 
in this list".

Thoughts?
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/RLOAB7GECXS2CHBVNGOVFVFFDBGJ6NAV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to