bullockbefriending bard skrev:
> On Jul 4, 7:09 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote:
>> bullockbefriending bard skrev:
>> A quick solution, not extensively tested
>>
>> # base needs to be an of the python builtin set
>>
>> def k_perm(base,k):
>> for e in base:
>>
On Jul 4, 7:09 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote:
> bullockbefriending bard skrev:
>
>
>
> > I was able to google a recipe for a k_permutations generator, such
> > that i can write:
>
> > x = range(1, 4) # (say)
> > [combi for combi in k_permutations(x, 3)] =>
>
> > [[1, 1, 1], [1, 1, 2
bullockbefriending bard skrev:
> I was able to google a recipe for a k_permutations generator, such
> that i can write:
>
> x = range(1, 4) # (say)
> [combi for combi in k_permutations(x, 3)] =>
>
> [[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 2, 1], [1, 2, 2], [1, 2, 3], [1,
> 3, 1], [1, 3, 2], [1, 3
On Jul 4, 1:22 pm, bullockbefriending bard <[EMAIL PROTECTED]>
wrote:
> I was able to google a recipe for a k_permutations generator, such
> that i can write:
>
> x = range(1, 4) # (say)
> [combi for combi in k_permutations(x, 3)] =>
>
> [[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 2, 1], [1, 2, 2], [1,
I was able to google a recipe for a k_permutations generator, such
that i can write:
x = range(1, 4) # (say)
[combi for combi in k_permutations(x, 3)] =>
[[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 2, 1], [1, 2, 2], [1, 2, 3], [1,
3, 1], [1, 3, 2], [1, 3, 3], [2, 1, 1], [2, 1, 2], [2, 1, 3], [2, 2,
1