have a list of lists such that the length of each inner list is either 1 or n (assume n > 1). For example, I have a list named ""
>>> test= [['AA', 'aa'], ['BB', 'bb'], ['CC'],['DD','dd']]
On the end I will make list like this:
[('AA', 'BB', 'CC', 'DD'),
('AA', 'BB', 'CC', 'dd'),
('AA', 'bb', 'CC', 'DD'),
('AA', 'bb', 'CC', 'dd'),
('aa', 'BB', 'CC', 'DD'),
('aa', 'BB', 'CC', 'dd'),
('aa', 'bb', 'CC', 'DD'),
('aa', 'bb', 'CC', 'dd')]
I try to solve this by use zip, but it seems impossible... Could anyone help me? Thanks very much.