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