LINUX.ORG.RU

История изменений

Исправление kernelpanic, (текущая версия) :

In [1]: import itertools


In [2]: itertools.combinations?
Type:       type
String Form:<type 'itertools.combinations'>
File:       /usr/lib/python2.7/lib-dynload/itertools.so
Docstring:
combinations(iterable, r) --> combinations object

Return successive r-length combinations of elements in the iterable.

combinations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3)


In [3]: itertools.combinations_with_replacement?
Type:       type
String Form:<type 'itertools.combinations_with_replacement'>
File:       /usr/lib/python2.7/lib-dynload/itertools.so
Docstring:
combinations_with_replacement(iterable, r) --> combinations_with_replacement object

Return successive r-length combinations of elements in the iterable
allowing individual elements to have successive repeats.
combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC

Исходная версия kernelpanic, :

In [2]: itertools.combinations?
Type:       type
String Form:<type 'itertools.combinations'>
File:       /usr/lib/python2.7/lib-dynload/itertools.so
Docstring:
combinations(iterable, r) --> combinations object

Return successive r-length combinations of elements in the iterable.

combinations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3)