On Mon, Apr 16, 2012 at 12:06 PM, Chinesekidz <chinesek...@googlemail.com> wrote: > Hello Guys: > > How can I stop the program as soon as one of the condition is met? > > > Here is example: > > The loop should be stop asking for more input if a=b or c=6. > > I tried to write one but it only stop when a=b and not when c=6
Please post the code from your attempt next time. That way, we can explain where the error lies in your code. Assuming input should be asked for at least once: while True: get_more_input() if a == b or c == 6: break Assuming not asking for input at all is permissible: while a != b and c != 6: get_more_input() Cheers, Chris -- http://mail.python.org/mailman/listinfo/python-list