I have an array like this: ['a', ['e', 'r', 't'], 'c'].
I want to use some sort of processing to make the array neat:
[['a', 'e', 'c'], ['a', 'r', 'c'], ['a', 't', 'c']].
If the array is: ['a', ['e', 'r', 't'], ['c', 'd']].
The result is:
[['a', 'e', 'c'], ['a', 'e', 'd'], ['a', 'r', 'c'], ['a', 'r', 'd'], ['a', 't', 'c'], ['a', 't', 'd']].
And the length of the array is not fixed to 3, other examples:
['a', 'b'] = > ['a', 'b']
['a', ['b', 'c']] => [['a', 'b'], ['a', 'c']]
['ab', ['b', 'c']] => [['ab', 'b'], ['ab', 'c']]
[[1, 2], 3, 4] => [[1, 3, 4], [2, 3, 4]]
So what should I do? Is there a solution in Numpy?
['a', ['e', 'r', 't'], ['b', 'c']]?['a', ['e', 'r', ['t', 'y']], 'c']