3.6 if...elif...else组合使用的语法

一、组合判断

  1. 语法:

    if 判断条件1:
      	满足条件1做的内容
    elif 判断条件2:
    		满足条件2做的内容
    ...
    else :
      	不满足上述条件做的内容

Last updated

Was this helpful?