You can use the tabulate library to adapt your need, see an example use based on some data that you introduced:
>>> from tabulate import tabulate
>>> data = [[2000, 0.00, 0.01, 0.00, 0.00, 1485, 2128, 79, 286], [4000, 0.01, 0.02, 0.00, 0.00, 2286, 4673, 264, 92]]
>>> headers = ['n', 'Insercao', 'Selecao', 'Merge', 'Quick', 'Insercao', 'Selecao', 'Merge', 'Quick']
>>> print(tabulate(data, headers, tablefmt='psql'))
+------+------------+-----------+---------+---------+------------+-----------+---------+---------+
| n | Insercao | Selecao | Merge | Quick | Insercao | Selecao | Merge | Quick |
|------+------------+-----------+---------+---------+------------+-----------+---------+---------|
| 2000 | 0 | 0.01 | 0 | 0 | 1485 | 2128 | 79 | 286 |
| 4000 | 0.01 | 0.02 | 0 | 0 | 2286 | 4673 | 264 | 92 |
+------+------------+-----------+---------+---------+------------+-----------+---------+---------+