All combinations of a mapped list of lists in python -
Hello how can I get a list of maps to print all possible combinations
It is said that the core mapping = {1: [A, B], 2: [C, D] ......
then with the list [1,2] and above all the sample mapping Product Mapping by importing itertools = {1: ['A', 'I' 'B'], 2: ['C', 'D']} data = [1, 2] for the combo in the product (* (mapping for data [D]): Print Results in Edit It looks like you actually want Which
('a', 'c') ('a', 'd') ('b', 'c' ('B', 'D')
wire == ['AC', 'Advertising', 'BC', 'BD'] .
Comments
Post a Comment