[Python3] Custom sort with optimisation (5 lines)
Convert all numbers according mapping and save converted values to  mappedNums. Of course we can use convert on the fly during sorting, but imagine if we have a
1. Convert all numbers according `mapping` and save converted values to  `mappedNums`. Of course we can use convert on the fly during sorting, but imagine if we have a lot of duplicates in `nums` and convert the same numbers some times will be inefficient. \n2. Use standart flag `key` for sorting by our generated hashMap `mappedNums`\n```python3 []\nclass Solution:\n    def sortJumbled(self, mapping: List[int], nums: List[int]) -> List[int]:\n        mappedNums = {}\n        for num in nums:\n            if num in mappedNums: continue\n            mappedNums[num] = int(\'\'.join(str(mapping[int(d)]) for d in str(num)))\n\n        return sorted(nums, key = mappedNums.get)\n```\n```python3 []\nclass Solution:\n    def sortJumbled(self, mapping: List[int], nums: List[int]) -> List[int]:\n        mappedNums = {}\n        for num in nums:\n            if num in mappedNums: continue\n            digits = map(int, str(num))\n            mappedNum = \'\'.join(str(mapping[d]) for d in digits)\n            mappedNums[num] = int(mappedNum)\n\n        return sorted(nums, key = mappedNums.get)\n```
['Python', 'Python3']