[Tutor] Testing for empty list

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


Hi,

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.

Stefan



More information about the Tutor mailing list