On 22/06/2013 22:31, Борислав Бориславов wrote:
while 1:
     name=raw_input("What is your name? ")
     if name == "bobi": print "Hello Master!" and break
     else: print "error"

I want if my conditions are met to do a couple of things and i cant do that


You most certainly can :)

while 1:
    name=raw_input("What is your name? ")
    if name == "bobi":
        print "Hello Master!"
print "Why do some people insist on cramming all of their code onto one line?"
        break
    else:
        print "error"

--
"Steve is going for the pink ball - and for those of you who are watching in black and white, the pink is next to the green." Snooker commentator 'Whispering' Ted Lowe.

Mark Lawrence

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

Reply via email to