split string by 2 substrings python code example Example: python convert strings to chunks s = '1234567890' o = [] while s: o.append(s[:2]) s = s[2:]