Three python flow control

Three flow control statements:


1. The order of execution

  From top to bottom in the order execution



2. Select the branch (the else IF)

  IF expression:
    code execution

  elif expression:
    code execution

  elif expression:  
    code execution
....
  The else:
    code execution

Description: only need to meet one condition, which condition the following code program is executed, and then exit branch

 

3. loop
  for i in xxxx:
    Print (i)

  while expressions
    print

Guess you like

Origin www.cnblogs.com/likeye/p/10977770.html