def scale(table):
t = []<EOL>columns = [[] for i in table[<NUM_LIT:0>]]<EOL>for row in table:<EOL><INDENT>for i, v in enumerate(row):<EOL><INDENT>columns[i].append(v)<EOL><DEDENT><DEDENT>sums = [float(sum(i)) for i in columns]<EOL>scale_to = float(max(sums))<EOL>scale_factor = [scale_to/i for i in sums if i != <NUM_LIT:0>]<EOL>for row in table:<EOL><INDENT>t.append([a * b for a,b in zip(row, scale_factor)])<EOL><DEDENT>return t<EOL>
scale table based on the column with the largest sum