On Mon, Oct 19, 2009 at 2:26 AM, Todd Matsumoto <tmatsum...@gmx.net> wrote:

> The while loop will print each index of the list.

No it's printing each element of the list, not the index.


> In a way it checks that if the list is empty by printing the items. As far
> as I know there isn't any 'True' or 'False' output from a list.
>

I'm not sure what you mean here because...

>
> If you want to do something if mylist is empty you can check it like this:
>
> if not mylist:
>

An "if" statement checks a boolean state so the list must be evaluating to a
boolean somehow.  (It does, it's False if it's empty and True otherwise).
-Luke
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to