내 목록에있는 160 개 요소의 일부 조합을 만들고 싶지만 모든 가능한 조합을 만들고 싶지 않거나 끝나지 않을 것입니다. 나는 단지 약간을 원해. 1,2,3,4를 말하게해라. 대신 하나 하나 일을조합 nCr을 x에서 y (nCx -nCy)로 만드는 방법
:
combination = itertools.combinations(lst, 1)
combination = itertools.combinations(lst, 2)
combination = itertools.combinations(lst, 3)
combination = itertools.combinations(lst, 4)
어떻게 4 할 수 있습니다 ???
가능한 중복 [파이썬에서 모든 목록의 조합 생성하기] (http://stackoverflow.co m/questions/17434070/generation-all-of-a-list in-python) – MikeJRamsey56