1

With this code:

from tabulate import tabulate
print(tabulate(["0", "1", "2"]))

I get:

-
0
1
2
-

I would like to get:

-  -  -
0  1  2
-  -  -

Any ideas?

LoneCodeRanger
  • 413
  • 6
  • 18

1 Answers1

3

Got it! This works:

print(tabulate([["0", "1", "2"]]))   # (Put the original list inside a list.)
LoneCodeRanger
  • 413
  • 6
  • 18