Perfect shuffle: Difference between revisions

m
→‎{{header|Python}}: Added a module-level docstring
m (used a bigger font so that the colored card indicators (suit and pip) are more easier read, add whitespace before the TOC (table of contents).)
m (→‎{{header|Python}}: Added a module-level docstring)
Line 1,526:
</lang>
More functional version of the same code:
<lang python>from functools import partial
"""
Brute force solution for the Perfect Shuffle problem.
See http://oeis.org/A002326 for possible improvements
"""
from functools import partial
from itertools import chain
from operator import eq
35

edits