天天看點

break-跳出内循環

i = 1
j = 1
while i <= 10:
    print('第%d個碗' % i)
    while j <= 10:
        if j == 5:
            break
        else:
            print('這是内循環的第%d個碗' % j)
        j += 1
    i += 1