I am trying to generate all the possible scenarios which I can place k number of designs in n number of positions. Which should give k^n scenarios. For example lets say k = 2 and n = 3, all the scenarios are:
| n1 | n2 | n3 |
|---|---|---|
| 1 | 1 | 1 |
| 1 | 1 | 2 |
| 1 | 2 | 1 |
| 1 | 2 | 2 |
| 2 | 1 | 1 |
| 2 | 1 | 2 |
| 2 | 2 | 1 |
| 2 | 2 | 2 |
so there has to be 8 (2^8) scenarios.
I have tried combinations , permutations and combinations_with_replacement from itertools but none of seem to give the solution which I am trying for.
Is there a python function to generate this?