The simple and reliable way to "select" units, doubles, trinities etc.. of a string as you already know is this:
somestr = 'ABCDABCDABCDABCDABCDABCD'
a = 0
z = 3
for i in somestr:
i = somestr[a:z]
# finally here i can work with with these 3 first characters of the somestr
a += 1 # or 3 for non-overlapping
z += 1
So my question is how could someone simplify this block of code according to the rules of python.
I'm interested in both overlapping and non-overlapping cases.