Finding duplicate file names and modifying them based on elements of the path
__peter__ at web.de
Fri Jul 20 09:35:02 CEST 2012
Larry.Martell at gmail.com wrote:
> It seems that if you do a list(group) you have consumed the list. This
> screwed me up for a while, and seems very counter-intuitive.
Many itertools functions work that way. It allows you to iterate over the
items even if there is more data than fits into memory.
If you need to keep all items and are sure that your computer can cope with
them at once you can always throw in a
group = list(group)
More information about the Python-list