>>> from faro_doctest import faroShuffle >>> # To shuffle two cards... >>> faroShuffle([0, 1]) [0, 1] >>> # Four cards... >>> faroShuffle([0, 1, 2, 3]) [0, 2, 1, 3] >>> # A deck (range) of 10 cards... >>> faroShuffle(range(10)) [0, 5, 1, 6, 2, 7, 3, 8, 4, 9] >>> # Suppose we try to shuffle a list that includes non-integers... >>> faroShuffle(['queen', 'jack', 'ace', 7]) ['queen', 'ace', 'jack', 7] >>> # Three cards, being an odd number, should raise an exception... >>> faroShuffle([0, 1, 2]) Traceback (most recent call last): ... ValueError: attempt to assign sequence of size 2 to extended slice of size 1 >>> # How about something that's not a sequence? >>> faroShuffle(1) Traceback (most recent call last): ... TypeError: object of type 'int' has no len() >>> # An empty list should be returned unchanged. >>> faroShuffle([]) [] >>> # How about an empty argument list? >>> faroShuffle() Traceback (most recent call last): ... TypeError: faroShuffle() missing 1 required positional argument: 'oldDeck'