Typesetting Latex Tables with Python

Typesetting tables in latex is annoying. In practice, I usually have the tabular data in some programming-friendly format and need to put it in latex. I forget how to do this nicely, but it's extremely simple using the tabulate package in python. import tabulate from itertools import batched # Data A = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 10 , 11 , 14 , 15 , 17 , 19 , 21 , 23 , 26 , 31 , 34 , 35 , 39 ,…