[Python 3] Convert string to list and use brute-force
python3 []\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        s = list(map(int, s))\n        while len(s) > k:\n            tmp = []\n   
```python3 []\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        s = list(map(int, s))\n        while len(s) > k:\n            tmp = []\n            for i in range(0, len(s), k):\n                S = sum(s[i:i+k])\n                for d in (str(S)):\n                    tmp.append(int(d))\n            s = tmp\n\n        return \'\'.join(map(str, s))\n```
['Python', 'Python3']