Return

I need to make a function.

1 Name: Anonymous 2018-11-24 23:28
I need to make a function that creates permutations recursively. Here we get [[1, 1, 1], [1, 1, 2], [1, 2, 1], [1, 2, 2], [2, 1, 1], [2, 1, 2], [2, 2, 1], [2, 2, 2]] as all possible permutations of length 3, but I need to generalize it to length n.
Anyone up for a challenge?
2 Name: Anonymous 2018-11-24 23:31
>>1
If you are using python, then there is a library with tools just for this purpose. It's called itertools.
3 Name: Anonymous 2018-11-24 23:33
>>2
Got it, thanks!

Return
Name:
Leave this field blank: