one liner beats 98% on both time and space!!!
\n\n# Approach\n1. The list comprehension iterates over the string s in steps of k.\n2. For each step, s[i:i+k] extracts a substring of up to k characters.\n3. 
![Screenshot 2024-06-12 at 17.06.23.png](https://assets.leetcode.com/users/images/6e6dc466-8e81-4345-9b4d-33d22a70935f_1718208734.1927679.png)\n\n# Approach\n1. The list comprehension iterates over the string s in steps of k.\n2. For each step, s[i:i+k] extracts a substring of up to k characters.\n3. If the length of this substring is less than k, fill * (k - len(s[i:i+k])) pads it with the fill character to make it exactly k characters long.\n# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def divideString(self, s: str, k: int, fill: str) -> List[str]:\n        return [s[i:i+k] + fill * (k - len(s[i:i+k])) for i in range(0, len(s), k)]\n\n\n```
['Python3']