Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用此代码:
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.)