[python] custom key, convert the number
\n    def sortJumbled(self, mapping: List[int], nums: List[int]) -> List[int]:\n        \n        def convert(num):\n            if num == 0: \n                
```\n    def sortJumbled(self, mapping: List[int], nums: List[int]) -> List[int]:\n        \n        def convert(num):\n            if num == 0: \n                return mapping[0]\n            mapped, multiplier = 0, 1\n            while num:\n                mapped += multiplier * mapping[num%10]\n                multiplier *= 10\n                num = num // 10\n            return mapped\n        \n        return sorted(nums, key=convert)\n```
['Sorting', 'Python']