[Tutor] Testing for empty list

Stefan Behnel stefan_ml at behnel.de
Mon Oct 19 11:57:29 CEST 2009


please don't top-post.

Todd Matsumoto wrote:
> I don't understand how the while loop efficiently tests if the list is
> empty.

It doesn't. It only tests a condition. And the result of the condition is
determined by the list itself, which knows if it's empty or not.


More information about the Tutor mailing list