python3 simple solution
python\ndef digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            arr = [s[i:i+k] for i in range(0,len(s),k)] # divide \n            ar
```python\ndef digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            arr = [s[i:i+k] for i in range(0,len(s),k)] # divide \n            arr = [str(sum(int(i) for i in s)) for s in arr] # replace\n            s = \'\'.join(arr) # merge\n        return s\n```
['Python', 'Python3']