使用制表,如何将列表打印为单行而不是单列?

Using tabulate, how to print a list as a single row instead of a single column?

使用此代码:

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

我得到:

-
0
1
2
-

我想得到:

-  -  -
0  1  2
-  -  -

有什么想法吗?

知道了!这有效:

print(tabulate([["0", "1", "2"]]))   # (Put the original list inside a list.)