scores = []
n = int(input("请输入评委的人数:"))
for i in range(n):
score = int(input("请输入第{}个分数:".format(i+1)))
scores.append(score)
scores.remove(max(scores))
scores.remove(min(scores))
# del scores[scores.index(max(scores))] # 最大值,最小值所在索引
# del scores[scores.index(min(scores))]
print("avg_score:", sum(scores)/len(scores))
# 改变输入方式,一次性输入,空格隔开
sstring = input('please input score 1 to score n:')
scores = sstring.split()
scores = [int(i) for i in scores]
del scores[scores.index(max(scores))]
del scores[scores.index(min(scores))]
print("avg_score:", sum(scores)/len(scores))