我手头有一项任务,我尝试将列表cA中的系数乘以2D列表K中的字符串 并且出现错误TypeError:不能将序列乘以非类型&int的浮点数'
K = ReadFile(open('C:\\Users\\222\\PycharmProjects\\untitled8\\K.txt'))
cA = ReadFile(open('C:\\Users\\222\\PycharmProjects\\untitled8\\cA.txt'))
matrixA = [[0 for x in range (5)] for x in range (5)]
for i in range (5):
for j in range(5):
matrixA[i][j] = cA[i] * K[i][j]
print (matrixA)