Python 3 : Simple and cool !!! Display Table of Food Orders in a Restaurant..
\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        if not orders :\n            return []\n        table = defa
```\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        if not orders :\n            return []\n        table = defaultdict(lambda : defaultdict(int))\n        dishes = set()\n        for name,tn,item in orders :\n            table[int(tn)][item] += 1 \n            dishes.add(item)\n        print(table)\n        dishes = [["Table"]+list(sorted(dishes))]\n        indexes = {j:i for i,j in enumerate(*dishes)}\n        print(indexes)\n        for i in sorted(table.keys()) :\n            l = [\'0\']*len(indexes)\n            l[0] = str(i) \n            for dish_name in table[i] :\n                l[indexes[dish_name]] = str(table[i][dish_name]) \n            dishes.append(l)\n        return dishes \n```
[]