I am following this tutorial:
and in one of the lines there is the function:
(cnts, boundingBoxes) = zip(*sorted(zip(cnts, boundingBoxes),
key=lambda b:b[i], reverse=reverse))
You need to understand what the code is trying to do. The first part
sorted(zip(cnts, boundingBoxes) creates a sorted list which is the zipped version of
boundingBoxes. The asterisk "unzips" it so that the outer
zip can produce the correct output.