語法補漏

1.if...elif...else...test

代碼示例:

test=10
if test>9:
    print(1)
elif test>8:
    print(2)
elif test>7:
    print(3)
else:
   print('nothing')

輸出代碼:

1

相關文章
相關標籤/搜索