-
-
Save canwe/e581181364db932a792ef01c3eb2d8be to your computer and use it in GitHub Desktop.
Revisions
-
phil jones created this gist
Feb 25, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ def perm(xs) : if xs == [] : yield [] for x in xs : ys = [y for y in xs if not y==x] for p in perm(ys) : yield ([x] + p)