tableData = [['apples', 'oranges', 'cherries', 'banana'],
['Alice', 'Bob', 'Carol', 'David'],
['dogs', 'cats', 'moose', 'goose']]
text = [[], [], [], []]
for j in range(4):
for i in range(3):
text[j].append(tableData[i][j])
text_t = text[j]
text_n = ' '.join(text_t)
text_p = text_n.rjust(25)
print(text_p)
Python编程快速上手-让繁琐工作自动化 6.7实践项目 表格打印
最新推荐文章于 2024-05-21 22:44:12 发布