campy.datastructures.shuffle module

Shuffle an immutable collection and return a copy of the collection.

campy.datastructures.shuffle.shuffle(collection, random=None)[source]

Return a randomly shuffled copy of a collection.

Note that this function’s behavior depends on the type of its input.

If collection represents an infinite iterable, this will loop indefinitely.