Latest recipes tagged "combinations"http://code.activestate.com/recipes/tags/combinations/new/2010-02-07T06:47:14-08:00ActiveState Code RecipesSimple Permutations (Python)
2010-02-07T06:47:14-08:00manchesterboyhttp://code.activestate.com/recipes/users/4172234/http://code.activestate.com/recipes/577031-simple-permutations/
<p style="color: grey">
Python
recipe 577031
by <a href="/recipes/users/4172234/">manchesterboy</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/combinations/">combinations</a>, <a href="/recipes/tags/permutations/">permutations</a>).
Revision 2.
</p>
<p>Given a string of chars and a length, returns permutations of the specified length using the char string given in order. For example, given a string of "01" and a length of 3 returns 000, 001, 010, 011 ... 111</p>