Python | Recursive Solution | Easy to understand
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        def util(s):\n\t\t\t# if length of s is less than or equal to k, then we can not m
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        def util(s):\n\t\t\t# if length of s is less than or equal to k, then we can not make s any shorter\n            if len(s) <= k:\n                return s\n            ans = \'\'\n            for i in range(0, len(s), k):\n                ans += str(sum(int(c) for c in s[i:i + k]))\n\t\t\t# If new string\'s length is more than k, call the function recursively\n            if len(ans) > k:\n                return util(ans)\n            return ans\n        return util(s)
['Recursion']