Python Recursive Approach
\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        \n        def func(s,k):\n            if len(s)<=k:\n                return s\n      
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        \n        def func(s,k):\n            if len(s)<=k:\n                return s\n            \n            x=""\n            a=k\n            for i in range(0,len(s),++k):\n                y=s[i:i+k]\n                z=0\n                for j in y:\n                    z+=int(j)\n                x+=str(z)   \n            return func(x,k)\n        \n        return func(s,k)\n```\nIf u understood the code then plz.......UPVOTE...........Thnx in adv
['Recursion', 'Python']