Python || Easy Solution
Please upvote if it helps. Thank you!\n\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            new_s = \'\'\n 
**Please upvote if it helps. Thank you!**\n```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            new_s = \'\'\n            for i in range(0, len(s), k):\n                new_s += str(sum([int(c) for c in s[i:i+k]]))\n            s = new_s[:]\n        return s\n```
['Python']