def reader():
myfile = open("scores.txt","r")
pre = myfile.readlines()
for line in pre :
x = line.split(",")
a = x[0]
b = x[1]
c = len(b)-1c
b = b[0:c]
highest[a] = b
我已成功将分数写入文件,我打算将该文件读入一个文件夹,但它不起作用。我得到了:
error: IndexError: list index out of range
我该如何解决? 再见了