Python type casting
\nclass Solution:\n    def smallestNumber(self, num: int) -> int:\n        \n        l = len(str(num))\n        res = 0\n        sign = False if num > 0 else Tr
```\nclass Solution:\n    def smallestNumber(self, num: int) -> int:\n        \n        l = len(str(num))\n        res = 0\n        sign = False if num > 0 else True\n        \n        if not sign:\n            num = list(str(num))\n            num.sort()\n            for x, y in enumerate(num):\n                if y != \'0\':\n                    num.insert(0, y)\n                    num.pop(x+1)\n                    break\n        else:\n            num = list(str(num))\n            num.sort(reverse = True)\n            num.pop()\n        \n        for x in num:\n            res *= 10\n            res += int(x)\n        if sign:res *= -1\n        \n        return res\n            \n            \n\n```
['Python']