1
You can use the library tabulate and go adapting your need, see an example of use based on some data you presented:
>>> 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 |
+------+------------+-----------+---------+---------+------------+-----------+---------+---------+