541ca1827fbdc2ab040760f08401c85751b3fb8b
8 match
= re
.match('\(= i(?P<i>\d+)a(?P<a>\d+) (?P<v>\d+)\)', line
)
10 iterations
[match
.group('i')] = iterations
.get(match
.group('i'), {})
11 iterations
[match
.group('i')][match
.group('a')] = match
.group('v')
13 print('$\\begin{array}{|l|lllllll|}')
15 print('\t\\text{{n}} & a_1 & {} & a_7\\\\'.format(
16 ' & '.join('a_{}'.format(a
) for a
in sorted(iterations
['0']))))
18 for i
in sorted(iterations
, key
=int):
19 print('\t{} & 1 & {} & 7\\\\'.format(i
, ' & '.join(
20 iterations
[i
][a
] for a
in sorted(iterations
[i
], key
=int)
22 print('\t\\bottomrule')
23 print('\\end{array}$')