This is a function which generates random pairs using [code ]itertools.combinations[/code] [1] with [code ]random.shuffle[/code] [2] : [code]import random import itertools def get_random_pairs(numbers): # Generate all … How to get all sublists of a list in Python. In this tutorial, learn how to unpack tuple pairs in list with Python. On Jan 21, 10:20 pm, Alan Isaac