Wouivu 发表于 2020-7-5 09:28
老师你好,我尝试了改成len(data)
t = open('scores.txt', encoding='utf-8')
lines = t.readlines()
crossin先生 发表于 2020-7-5 20:23
把你加的那行去了,或者放在后面
e = len(data)
result = '%s \t: %d\n' % (data[0], sum/e)
欢迎光临 Crossin的编程教室 (https://bbs.crossincode.com/) | Powered by Discuz! X2.5 |