Created
March 3, 2017 19:43
-
-
Save jbiason/23bb381c31806a270cedeb1268499512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reorder = lambda eq: '+'.join(sorted(eq.split('+'), key=int)) | |
# (’3+2+1+1’), ’1+1+2+3’ | |
# (’1+2+3’), ’1+2+3’ | |
# (’2+2’), ’2+2’ | |
# (’1+3+2+3+2+1+3+2+3+1+2’), ’1+1+1+2+2+2+2+3+3+3+3’ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment