I guess that we could maybe extract `len(iterable)` to a local var here to avoid possibly counting through a long list 3 times?