I would like to render a 2-dimensional list to a nice tabular output, using an ANSI escape sequences to control the formatting.
So given this data:
data = [
[ 100, 20, 30 ],
[ 20, 10, 20 ],
[ 50, 400, 20 ]
]
I would like to output something like this:
100 20 30
20 10 20
50 400 20
Many Thanks
Here's a more elaborate solution that works with arbitrarily wide values:
Use it like this:
This prints: