[Python] 回歸線
「欸!你這題怎麽做?」 程式電神曾經說過:「 copy and paste 」 「 . . . 」 我謹記在心 def makeMatrix(m) : length = len(m) size = int( length**(1/2) ) matrix = [] for i in range(size) : newRow = [] for j in range(size) : newRow.append(m[i*size+j]) matrix.append(newRow) return matrix def makeCoordinate(m) : length = len(m) matrix = [] for row in range(length) : newRow = [m[row]] matrix.append(newRow) return matrix def transpose(m) : lengthRow = len(m) lengthCol = len(m[0]) matrix = [] for col in range(lengthCol) : newRow = [] for row in range(lengthRow) : newRow....