Mind, that Lawrence's solution may contain doubles:
>>> [ i for i in permute("aa") ]
[('a', 'a'), ('a', 'a')]If you don't want this, use sets. -- http://mail.python.org/mailman/listinfo/python-list
Mind, that Lawrence's solution may contain doubles:
>>> [ i for i in permute("aa") ]
[('a', 'a'), ('a', 'a')]If you don't want this, use sets. -- http://mail.python.org/mailman/listinfo/python-list