Using python2.7, I'm trying to print to screen tabular data.
This is roughly what my code looks like:
for i in mylist:
print "{}\t|{}\t|".format (i, f(i))
The problem is that, depending on the length of i
or f(i)
the data won't be aligned.
This is what I'm getting:
|foo |bar |
|foobo |foobar |
What I want to get:
|foo |bar |
|foobo |foobar |
Are there any modules that permit doing this?