按長度切割字串 === ```python= import re string = '123456789abcdefg' re.findall(r'.{3}', string) ``` ``` ['123', '456', '789', 'abc', 'def'] ``` ## Ref. [python 按照固定长度分割字符串的方法小结]([https://](https://www.nhooo.com/note/qagi8h.html)) ###### tags: `語法相關`