On Mon, Dec 22, 2008 at 1:33 PM, Eduardo Vieira <[email protected]> wrote:

> if 'arr' or 'bell' in item:

The interpreter sees this as
  if ('arr') or ('bell' in item):

'arr' always evaluates to True so the condition is always true. The
correct way to express this condition is
  if 'arr' in item or 'bell' in item:

Kent
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to