Simple Python3 solution
\n\n# Code\n\nclass Solution:\n    def minMaxDifference(self, num: int) -> int:\n        string_num = str(num)\n        maximum_number = int(string_num)\n      
\n\n# Code\n```\nclass Solution:\n    def minMaxDifference(self, num: int) -> int:\n        string_num = str(num)\n        maximum_number = int(string_num)\n        minimium_number = 0\n\n        for i in string_num:\n            if int(i) < 9:\n                maximum_number = int(string_num.replace(i, "9"))\n                break\n\n        for i in string_num:\n            if int(i) > 0:\n                minimum_number = int(string_num.replace(i, "0"))\n                break\n\n        return maximum_number - minimum_number\n        \n```
['Python3']