Uline may use randomized card decks for testing warehouse picking workflows. Given a list representing a deck, return a uniformly random permutation of the cards without modifying the original list.
Implement shuffle_deck(deck, seed). The optional seed makes the result deterministic for testing. When seed is None, use system-provided randomness. Every permutation must have equal probability.
deck, a Python list containing distinct or repeated card values, and seed, an integer or None.deck, possibly in a different order.def shuffle_deck(deck, seed):