[Python] | Simple Simulation solution
This is my first post, so let\'s start with an easy one.\nWhat we want to do here is to simulate the rounds by iterating until our string s is shorter than k, a
*This is my first post, so let\'s start with an easy one.*\nWhat we want to do here is to **simulate the rounds** by iterating until our string `s` is shorter than `k`, and in the loop we:\n* split `s` in groups of length `k` and store the results in a list `groups`\n* calculate the sum of the digits of each group `g` and store the results in `s`\n* return `s` when we exit the loop\n```\nclass Solution:\n    def digitSum(self, s: str, k: int) -> str:\n        while len(s) > k:\n            groups = [s[i:i+k] for i in range(0, len(s), k)]\n            s = ""\n            for g in groups:\n                tot = sum(int(n) for n in g)\n                s += str(tot)\n        return s\n```\n\n**Runtime:** 24 ms\n**Beats:** 98.22%\n\nI hope it\'s helpful! And if you have some advices please let me know, I have a lot to learn \u270C\uFE0F
['Python', 'Python3']