Python | Easy Solution✅
Code\u2705\n\nclass Solution:\n    def minMaxDifference(self, num: int) -> int:\n        maxx = num\n        for d in str(maxx):\n            if d != "9":\n    
# Code\u2705\n```\nclass Solution:\n    def minMaxDifference(self, num: int) -> int:\n        maxx = num\n        for d in str(maxx):\n            if d != "9":\n                maxx = int(str(maxx).replace(d,"9"))\n                break\n        minn = int(str(num).replace(str(num)[0],"0"))\n        return maxx - minn\n\n        \n```
['Python', 'Python3']