So I’ve been trying this for a while now, but I can’t seem to get a hold of it.
It seems like such a simple task:
From my input(list) I want to create all possible lists with the given length. So for instance:
Input list: [a,b]
Input length: 3
Output: [[a,a,a],[a,a,b],[a,b,a],[a,b,b],[b,a,a],[b,a,b],[b,b,b],[b,b,a]] (8 results because 2x2x2=8)
My knowledge with python is not that good, I can read it but find it hard to produce code on my own.
Basically I need some node or code that gives all the possibilities of a list like: 2^2 and not like 2! like the combination node does.
It’s like a safe-deposit: combination at a given length and the digits can be used multiple times.
A safe with 4 positions ranging from 0-9 can have 10x10x10x10=10.000 possibilities.
List.Permutation does give me lists at a given length, but isn’t giving lists that include the options of having to use an item more than once.
In case of my script both the amount of items and length of desired lists are variable.
Hoping someone here can help me, thanks in advance.