continue Statement : While : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » While »

 

continue Statement


valid = False
count = 3

passwdList = [1]
while count > 0:
    input = raw_input("enter password")
    for eachPasswd in passwdList:
        if input == eachPasswd:
            valid = True
            break
    if not valid:    # (or valid == 0)
        print "invalid input"
        count -= 1
        continue
    else:
        break



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Statement
» While