Python easy iterative solution for beginners
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            groups = [s[x:x+k] for x in range(0, len(s), k)]\n 
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            groups = [s[x:x+k] for x in range(0, len(s), k)]\n            temp = ""\n            for i in groups:\n                dig = [int(y) for y in i]\n                temp += str(sum(dig))\n            s = temp\n        return s
['Python', 'Python3']