python打印表格式数据,留出正确的空格,格式化打出 代码如下: def printPicnic(itemsDict,leftWidth,rightWidth): print('PICNIC ITEMS'.center(leftWidth + rightWidth,'-')) for k,v in itemsDict.items(): print(k.ljust(leftWidth,'.')+str(v).rjust(rightWidth)) picnicItems = {'sandwitch…