from tabulate import tabulate
Dict = {'name':'name','age':'age'}
KEY = list(Dict.keys())
VALUE = list(Dict.values())
VALUE = [str(x) for x in VALUE]
showdata = []
showdata.append(VALUE)
print(tabulate(showdata, headers=KEY, tablefmt='pipe', disable_numparse=True))

网友评论