Python | Very easy simulation
\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        \'\'\'\n          The basic idea is create a list of substrings with specified size k
```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        \'\'\'\n          The basic idea is create a list of substrings with specified size k\n          then perform digit sum and create a new string keep repeating the scenerio\n          untill the newly formed string size becomes less then k.\n        \'\'\'\n        while len(s) > k:\n            numslst = []\n            for i in range(0,len(s),k):\n                numslst.append(s[i:i+k])\n                \n            temp = \'\'\n            for num in numslst:\n                digits = [int(i) for i in num] # calculating digit in form of list\n                temp += str(sum(digits)) # calculating sum\n            s = temp # making current string as required string\n        return s\n```
['String', 'Python']