Produces combinations of iterable elements of lenght r.
From Python 2.6 docs under the Python Software Foundation License
A list-like or a str-like object that contains some elements
Number of elements in each ouput combination
A generator yielding combinations of lenght r