Looking for something like more_itertools random_product, but it must consider each iteration only once

88 Views Asked by At

I'm not sure if this is even possible, but basically I'm looking for something like "random_product" from more_itertools but I would like it to consider each iteration only once -- yet still consider all of them. It also has to be done "lazily."

Consider:

Product(ABC,repeat = 2)

AA, AB, AC, BA, BB, BC, CA, CB, CC

I would like to be able to have a for loop iterate that output lazily, randomly, and completely. Basically have it consider the output in a random order.

0

There are 0 best solutions below