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

  ('a', 'c') ('a', 'd') ('b', 'c' ('B', 'D')   

Edit It looks like you actually want

Which wire == ['AC', 'Advertising', 'BC', 'BD'] .

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -