Generating Combinations in python

后端 未结 3 1715
忘了有多久
忘了有多久 2020-12-29 07:54

I am not sure how to go about this in Python, if its even possible. What I need to do is create an array (or a matrix, or vector?) from 3 separate arrays. Each array as 4

3条回答
  •  独厮守ぢ
    2020-12-29 08:34

    Check the Python itertools standard module:

    itertools.combinations(iterable, r)

    Return r length subsequences of elements from the input iterable.

提交回复
热议问题