1.if...elif...else...
代码示例:
test=10
if test>9:
print(1)
elif test>8:
print(2)
elif test>7:
print(3)
else:
print('nothing')
输出代码:
1
1.if...elif...else...
代码示例:
test=10
if test>9:
print(1)
elif test>8:
print(2)
elif test>7:
print(3)
else:
print('nothing')
输出代码:
1
转载于:https://my.oschina.net/u/3754854/blog/1860224