Nick Matzke: > I have to do this hundreds of times, so speed would be useful. Try to create a 2D array with NumPy, and then slice it. Note that slicing syntax has a "stride" too. Bye, bearophile