StraightForward solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(2*n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n0(2*n)\n\n# Code\n```\nclass Solution:\n    def minMaxDifference(self, num: int) -> int:\n        mmax = \'0\'\n        mmin = \'0\'\n        # temp = set(list(str(num)))\n        # if set(list(str(num))) == {\'9\'}:\n        #     mmax = str(num)\n        # else:\n        #     for index,ele in enumerate(str(num)):\n        #         if ele != \'9\':\n        #             mmax = str(num).replace(ele,\'9\')\n        # mmin = str(num).replace(str(num)[0],\'0\')\n        # return int(mmax) - int(mmin)\n        for index,ele in enumerate(str(num)):\n            if ele != \'9\':\n                mmax = str(num).replace(ele,\'9\')\n                break\n            else:\n                mmax += ele\n        for index,ele in enumerate(str(num)):\n            if ele != \'0\':\n                mmin = str(num).replace(ele,\'0\')\n                break\n            else:\n                mmin += ele\n        \n        return int(mmax) - int(mmin)\n```
['Python3']