Get a list of combinations of lists' elements

前端 未结 4 1271
栀梦
栀梦 2020-12-11 07:55

Suppose I have 3 lists: [\'q\',\'w\'], [\'a\',\'s\'], [\'z\',\'x\']. How to get a list of possible combinations out of these lists? So I get a list [[\'q\',\'a\',\'z\'],[\'q

4条回答
  •  有刺的猬
    2020-12-11 08:18

    up you can create an inner class with a constructor (Parameters ...) , so you can put a list of this class which handles all the combinations

提交回复
热议问题