If len(items) requires iterating across the entire list, then you'reOn Fri, Aug 29, 2008 at 6:25 PM, Bruce Leban <firstname.lastname@example.org> wrote:
> Not quite: len(items) requires iterating across the entire list which may
> not be necessary or desirable. Plus you may need an intermediate variable to
> store it. I think that's inferior.
not using a Python list object, you're using someone else's (poorly
implemented) list data structure. Python lists give len(obj) in O(1).