code: def random_combination(iterable, r):
      "Random selection from itertools.combinations(iterable, r)"
      pool = tuple(iterable)
      n = len(pool)
      indices = sorted(random.sample(xrange(n), r))
      return tuple(pool[i] for i in indicesf random_combination(iterable, r):
      "Random selection from itertools.combinations(iterable, r)"
      pool = tuple(iterable)
      n = len(pool)
      indices = sorted(random.sample(xrange(n), r))
      return tuple(pool[i] for i in indices)
docs: Random selection from itertools.combinations(iterable, r)