我该怎么办?
我给出了这个错误:
mylist=input('please inter your condition :')
If mylist == '10' or '9' or '8':
print('well')
print('well done')
else if mylist == '7' or'6' or '5' or '4' or '3':
print('mid')
print('moderate')
else if mylist == '2' or '1':
print('weak')
else print('0')
File "<ipython-input-42-fc470037cf12>", line 5
else if mylist == '7' or'6' or '5' or '4' or '3':
^
SyntaxError: expected ':'
我更改以下间距:但是...我该怎么办?
1条答案
按热度按时间s5a0g9ez1#
在Python中,if...else语句有三种形式:
if语句
if...else语句
if... elif... else语句