配列に格納する必要がある 5 つのテキスト ファイルがあります。私はこのようにしてみました。
f=[]
f[0]=open('E:/cyg/home/Aiurea/workspace/nCompare5w5.txt','r')
f[1]=open('E:/cyg/home/Aiurea/workspace/nCompare5w10.txt','r')
f[2]=open('E:/cyg/home/Aiurea/workspace/nCompare5w20.txt','r')
f[3]=open('E:/cyg/home/Aiurea/workspace/nCompare5w50.txt','r')
f[4]=open('E:/cyg/home/Aiurea/workspace/nCompare5w80.txt','r')
for i in range(5):
f[i].close()
エラーメッセージは「IndexError:リスト割り当てインデックスが範囲外です」です