![](https://secure.gravatar.com/avatar/d52590167e4518a78d3c5d336adb9aab.jpg?s=120&d=mm&r=g)
Jan. 14, 2005
11:08 a.m.
"Colin J. Williams" <cjw@sympatico.ca> writes:
Yes, I'm not sure whether list comprehension produces an iter object but this should also be included.
Lists are iterable but they also have a length, which is not accessible through the iterator: from a general iterator there is no way of knowing in advance how many items it will return. This may be a problem if you want to allocate memory for the values. -- Timo Korvola <URL:http://www.iki.fi/tkorvola>