Simple and Concise Python 3 Solution
The intuition is to keep track of table and count of food items.\n\n\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n
The intuition is to keep track of table and count of food items.\n\n```\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        data = defaultdict(lambda: defaultdict(int))\n        food_items = set()\n        for order in orders:\n            table, food = int(order[1]), order[2]\n            data[table][food] += 1\n            food_items.add(food)\n        sorted_food_items = sorted(list(food_items))\n        result = [["Table"]+sorted_food_items]\n        for table in sorted(data.keys()):\n            result.append([str(table)]+[str(data[table][f]) for f in sorted_food_items])\n        return result\n```
[]