[Python] On-The-Fly add one like numbers and handle overflow cases
\nclass CombinationIterator:\n\n    def __init__(self, characters: str, combinationLength: int):\n        self.characters = characters\n        self.vocabSize =
```\nclass CombinationIterator:\n\n    def __init__(self, characters: str, combinationLength: int):\n        self.characters = characters\n        self.vocabSize = len(self.characters)\n        self.combinationLength = combinationLength\n        self.indexes = []\n        for i in range(combinationLength):\n            self.indexes.append(i)\n        self.valueAdded = True\n\n    def next(self) -> str:\n        ret = \'\'.join([self.characters[i] for i in self.indexes])\n        self.valueAdded = False\n        for j in range(self.combinationLength - 1, -1, -1):\n            if self.indexes[j] + (self.combinationLength-j) < self.vocabSize:\n                self.indexes[j] += 1\n                for i in range(j+1, self.combinationLength):\n                    self.indexes[i] = self.indexes[i-1] + 1\n                self.valueAdded = True\n                break\n        return ret\n    \n    def hasNext(self) -> bool:\n        return self.valueAdded\n```
[]