In article <[EMAIL PROTECTED]>,
 Gary Wessle <[EMAIL PROTECTED]> wrote:

> Hi
> 
> what does the i > a in this code mean. because the code below is
> giving False for all the iteration. isn't suppose to evaluate each
> value of i to the whole list? thanks
> 
> a = range(8)
> i = 0
> while i < 11:
>     print i > a
>     i = i + 1
> 
> False
> False
> False
> False
> False
> False
> False
> False
> False
> False
> False
> 
> 
> thanks

I'm not sure what you're expecting to happen, or what you're trying to do, 
but comparing an integer to a list is (almost) meaningless.

See http://docs.python.org/ref/comparisons.html, where it says, "objects of 
different types always compare unequal, and are ordered consistently but 
arbitrarily".
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to