python for double loop, else the second layer in the for loop continue, will exit the loop continues for a first layer

. 1  for A in [1,2,3,4,5 ]:
 2  
. 3      for B in [l, 2,3 ]:
 . 4          IF A == B:
 . 5              Print ( " A = B =% S " % A)
 . 6              BREAK # out of this loop for performing loop for the first row 
. 7      the else :
 . 8          Print ( " a S% = "   % a)
 . 9          continue continue # execution cycle of the first row for
 10  Print ( " end " )

. 1 = B = A
A = B = 2
A = B =. 3
A =. 4
A =. 5
End

 

Guess you like

Origin www.cnblogs.com/cfpl/p/12045170.html