I have an array which holds other arrays which are holding possible values of data at given position. Example:
data = [['A'],['A','B'],['A','B'],['A','B','D'],['0','2']]
From this data possible values are (for example):
"AAAA0" # (00000)
"AAAA2" # (00001)
"AAAD0" # (00020)
and so on.
What I would need, is to get all possible combinations of data from those single arrays, but order of data is important:
- data from inner array can only be placed on its position in outer array (in above example on first position only 'A' can be placed)
Is there some Python module that will be able to handle this (I found itertools, but it's doing not exactly what I need), or maybe someone has some idea how to do this ?