: means a range. So thats i to i+4 The third arg to the for loop is step size so its looking at 0,4,8 etc.. Rather than 0,1,2,3 etc It's grabbing groups of pixels, putting them in a list and then you're getting them out of the new list for the output.