Simple while loop
\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            nexts = ""\n            for i in range(0, len(s), k):\
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            nexts = ""\n            for i in range(0, len(s), k):\n                nexts += str(sum(int(d) for d in s[i:i+k]))\n            s = nexts\n        return s\n```
['Python']