In <0fa050c1-3a00-4c17-9fa6-b79a22485...@googlegroups.com> Bradley Wright 
<bradley.wright....@gmail.com> writes:

> while raw_input != "quit" or "q":

Others have pointed out flaws in this statement.  However, even if you
had written the loop the 'correct' way:

    user_input = raw_input()
    while user_input != "quit" or user_input != "q":

There is still a logic bug.  This loop will execute forever, because no
matter what the user enters, it will be unequal to "q" or unequal to "quit".
Use 'and' instead of 'or'.

Of course in this specific situation, as others have suggested, 'in' is
better still.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to