Simple and easy - faster than 99.31%
\nclass Solution:\n    def convertToBase7(self, num: int) -> str:\n        if not num:\n            return "0"\n        l=[]\n        x=num\n        if num<0:\n
```\nclass Solution:\n    def convertToBase7(self, num: int) -> str:\n        if not num:\n            return "0"\n        l=[]\n        x=num\n        if num<0:\n            num=-num\n        while num>0:\n            r=num%7\n            l.append(str(r))\n            num//=7\n        return "".join(l[::-1]) if x>=0 else "-"+ "".join(l[::-1]) \n```\nIf you like, please **UPVOTE**\nHappy Coding :)
['Python', 'Python3']