python all possible pairs code example
Example: python all possible pairs
list(itertools.combinations(iterable, r))
Return r length subsequences of elements from the input iterable.
Combinations are emitted in lexicographic sort order.
So, if the input iterable is sorted,
the combination tuples will be produced in sorted orde