How do I do the following in Python:
array_1 = [x1, x2, x3, x4, x5, x6, ....]
array_2 = [y1, y2, y3]
array_3 = [(x1-y1), (x2-y2), (x3-y3), (x4-y1), (x5-y2), (x6-y3)]
The number of elements in array_2 is always less than the number of elements in array_1.
array_1 and array_2 have an arbitrary number of elements.
[num of elements in array_1] mod [number of elements in array_2] = 0
Itertools has loads of tools to accommodate your problem
Understanding your problem
So here is the implementation