Python O(n) solution
\nclass Solution:\n    def divideString(self, s: str, k: int, fill: str) -> List[str]:\n        length = len(s)\n        res=[]\n        for i in range(0,length
```\nclass Solution:\n    def divideString(self, s: str, k: int, fill: str) -> List[str]:\n        length = len(s)\n        res=[]\n        for i in range(0,length,k):\n            if i+k>length:\n                break\n            res.append(s[i:i+k])\n        mod =length%k \n        \n        if mod!= 0:\n            fill_str = fill *(k-mod)\n            add_str = s[i:]+fill_str\n            res.append(add_str)\n            \n        return res    \n```
['Python3']