Results of 1 - 10 of about 46 for combinations (0.013 sec.)
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 14554
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...) p, q, ... [repeat=1] デカルト積、ネストしたforループと等価 permutations() p[, r] 長さrのタプル列、重複なしのあらゆる並び combinations() p, r 長さrのタプル列、ソートされた順で重複なし combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複...CD', repeat=2) AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD permutations('ABCD', 2) AB AC AD BA BC BD CA CB CD DA DB DC combinations('ABCD', 2) AB AC AD BC BD CD combinations_with_replacement('ABCD', 2) AA AB AC AD BB BC BD CC CD DD Itertool関数 ¶ The fol...terables ): # chain.from_iterable(['ABC', 'DEF']) → A B C D E F for iterable in iterables : yield from iterable itertools. combinations ( iterable , r ) ¶ 入力 iterable の要素からなる長さ r の部分列を返します。 The output is a subsequence of product() keepin... - https://man.mtool.work/python/3.14/library/itertools.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 14554
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...) p, q, ... [repeat=1] デカルト積、ネストしたforループと等価 permutations() p[, r] 長さrのタプル列、重複なしのあらゆる並び combinations() p, r 長さrのタプル列、ソートされた順で重複なし combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複...CD', repeat=2) AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD permutations('ABCD', 2) AB AC AD BA BC BD CA CB CD DA DB DC combinations('ABCD', 2) AB AC AD BC BD CD combinations_with_replacement('ABCD', 2) AA AB AC AD BB BC BD CC CD DD Itertool関数 ¶ The fol...terables ): # chain.from_iterable(['ABC', 'DEF']) → A B C D E F for iterable in iterables : yield from iterable itertools. combinations ( iterable , r ) ¶ 入力 iterable の要素からなる長さ r の部分列を返します。 The output is a subsequence of product() keepin... - https://man.mtool.work/python/3.14/library/itertools.html
- 関数型プログラミング HOWTO — Python 3.14.8 ドキュメント 8451
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » 関数型プログラミング HOWTO テーマ 自動 ライト ダーク | 関数型プログラミング HOWTO ¶ Author : A. M. Kuchling Release : 0.32 この文書では、関数型スタ
...: itertools . compress ([ 1 , 2 , 3 , 4 , 5 ], [ True , True , False , False , True ]) => 1 , 2 , 5 組合せ関数 ¶ itertools.combinations(iterable, r) は、 iterable から r -tuple 選択する全ての組み合わせを提供するイテレータを返します itertools . combinations (...> ( 1 , 2 ), ( 1 , 3 ), ( 1 , 4 ), ( 1 , 5 ), ( 2 , 3 ), ( 2 , 4 ), ( 2 , 5 ), ( 3 , 4 ), ( 3 , 5 ), ( 4 , 5 ) itertools . combinations ([ 1 , 2 , 3 , 4 , 5 ], 3 ) => ( 1 , 2 , 3 ), ( 1 , 2 , 4 ), ( 1 , 2 , 5 ), ( 1 , 3 , 4 ), ( 1 , 3 , 5 ), ( 1 , 4 , 5 ), (...' , 'a' ) 全く同じタプル ('a', 'a', 'b') が 2度現れていますが、これは 2つの 'a' が別の位置からのものだからです。 itertools.combinations_with_replacement(iterable, r) 関数は別の制約を取り払います: 一回の選択で同じ要素を繰り返し選んでも良い。概念的には、それぞ... - https://man.mtool.work/python/3.14/howto/functional.html
- 関数型プログラミング HOWTO — Python 3.14.8 ドキュメント 8451
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » 関数型プログラミング HOWTO テーマ 自動 ライト ダーク | 関数型プログラミング HOWTO ¶ Author : A. M. Kuchling Release : 0.32 この文書では、関数型スタ
...: itertools . compress ([ 1 , 2 , 3 , 4 , 5 ], [ True , True , False , False , True ]) => 1 , 2 , 5 組合せ関数 ¶ itertools.combinations(iterable, r) は、 iterable から r -tuple 選択する全ての組み合わせを提供するイテレータを返します itertools . combinations (...> ( 1 , 2 ), ( 1 , 3 ), ( 1 , 4 ), ( 1 , 5 ), ( 2 , 3 ), ( 2 , 4 ), ( 2 , 5 ), ( 3 , 4 ), ( 3 , 5 ), ( 4 , 5 ) itertools . combinations ([ 1 , 2 , 3 , 4 , 5 ], 3 ) => ( 1 , 2 , 3 ), ( 1 , 2 , 4 ), ( 1 , 2 , 5 ), ( 1 , 3 , 4 ), ( 1 , 3 , 5 ), ( 1 , 4 , 5 ), (...' , 'a' ) 全く同じタプル ('a', 'a', 'b') が 2度現れていますが、これは 2つの 'a' が別の位置からのものだからです。 itertools.combinations_with_replacement(iterable, r) 関数は別の制約を取り払います: 一回の選択で同じ要素を繰り返し選んでも良い。概念的には、それぞ... - https://man.mtool.work/python/3.14/howto/functional.html
- What's New In Python 3.1 — Python 3.14.8 ドキュメント 7841
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.1 テーマ 自動 ライト ダーク | What's New In Python 3.1 ¶ 著者 : Raymond Hettinger This article explains the new fea
...になっています。 (Contributed by Raymond Hettinger and Mark Dickinson.) itertools に 2 つの関数が追加されました。 itertools.combinations_with_replacement() 関数は、置換 (順列, permutation) や直積 (Cartesian product) を含む組合せ論の 4 つの生成関数のうちの 1 つ...、そして数え方に fractions.Fraction や decimal.Decimal を含む任意の数値型を使えるようになりました。 >>> [ p + q for p , q in combinations_with_replacement ( 'LOVE' , 2 )] ['LL', 'LO', 'LV', 'LE', 'OO', 'OV', 'OE', 'VV', 'VE', 'EE'] >>> list ( compress ( data =... - https://man.mtool.work/python/3.14/whatsnew/3.1.html
- 組み込み型 — Python 3.14.8 ドキュメント 7841
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » 組み込み型 テーマ 自動 ライト ダーク | 組み込み型 ¶ 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主
.... If omitted or None , the chars argument defaults to removing whitespace. The chars argument is not a suffix; rather, all combinations of its values are stripped. For example: >>> ' spacious ' . rstrip () ' spacious' >>> 'mississippi' . rstrip ( 'ipz' ) 'mi...ed or None , the chars argument defaults to removing whitespace. The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped. Whitespace characters are defined by str.isspace() . 例えば: >>> ' spacious ' . strip () 'spac...itted or None , the bytes argument defaults to removing ASCII whitespace . The bytes argument is not a prefix; rather, all combinations of its values are stripped: >>> b ' spacious ' . lstrip () b'spacious ' >>> b 'www.example.com' . lstrip ( b 'cmowz.' ) b'... - https://man.mtool.work/python/3.14/builtins/stdtypes.html
- What's New In Python 3.1 — Python 3.14.8 ドキュメント 7841
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.1 テーマ 自動 ライト ダーク | What's New In Python 3.1 ¶ 著者 : Raymond Hettinger This article explains the new fea
...になっています。 (Contributed by Raymond Hettinger and Mark Dickinson.) itertools に 2 つの関数が追加されました。 itertools.combinations_with_replacement() 関数は、置換 (順列, permutation) や直積 (Cartesian product) を含む組合せ論の 4 つの生成関数のうちの 1 つ...、そして数え方に fractions.Fraction や decimal.Decimal を含む任意の数値型を使えるようになりました。 >>> [ p + q for p , q in combinations_with_replacement ( 'LOVE' , 2 )] ['LL', 'LO', 'LV', 'LE', 'OO', 'OV', 'OE', 'VV', 'VE', 'EE'] >>> list ( compress ( data =... - https://man.mtool.work/python/3.14/whatsnew/3.1.html
- random --- 疑似乱数を生成する — Python 3.14.8 ドキュメント 7628
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » random --- 疑似乱数を生成する テーマ 自動 ライト ダーク | random --- 疑似乱数を生成する ¶ ソースコード: Lib/
...e r return tuple ( random . sample ( pool , r )) def random_combination ( iterable , r ): "Random selection from itertools.combinations(iterable, r)" pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . sample ( range ( n ), r )) return tup...ble , r ): "Choose r elements with replacement. Order the result to match the iterable." # Result will be in set(itertools.combinations_with_replacement(iterable, r)). pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . choices ( range ( n... - https://man.mtool.work/python/3.14/library/random.html
- What's New in Python 2.6 — Python 3.14.8 ドキュメント 7628
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.6 テーマ 自動 ライト ダーク | What's New in Python 2.6 ¶ 著者 : A.M. Kuchling (amk at amk.ca) This article explains
...4, 2, 4), (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4), (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)] combinations(iterable, r) は、入力 iterable の要素からなる長さ r の部分列を返します (---訳注: 数学の初等組み合わせ論の「組合せ (combina...tion)」 ---): >>> list ( itertools . combinations ( '123' , 2 )) [('1', '2'), ('1', '3'), ('2', '3')] >>> list ( itertools . combinations ( '123' , 3 )) [('1', '2', '3')] >...>> list ( itertools . combinations ( '1234' , 3 )) [('1', '2', '3'), ('1', '2', '4'), ('1', '3', '4'), ('2', '3', '4')] permutations(iter[, r]) は入力 iterab... - https://man.mtool.work/python/3.14/whatsnew/2.6.html
- What's New in Python 2.7 — Python 3.14.8 ドキュメント 7628
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.7 テーマ 自動 ライト ダーク | What's New in Python 2.7 ¶ 著者 : A.M. Kuchling (amk at amk.ca) この文書は Python 2.7
...が真であれば返されます: itertools . compress ( 'ABCDEF' , [ 1 , 0 , 1 , 0 , 1 , 1 ]) => A , C , E , F 新しい関数: itertools.combinations_with_replacement(iter, r) は、 iter から、すべての可能な長さ r の要素の組合せを返します。 combinations() とは異なり、生成さ...れた組合せに個別の要素が繰り返し出現できます: itertools . combinations_with_replacement ( 'abc' , 2 ) => ( 'a' , 'a' ), ( 'a' , 'b' ), ( 'a' , 'c' ), ( 'b' , 'b' ), ( 'b' , 'c' ), ( 'c' , 'c' )...Decimal インスタンスのような、非整数の値を使えるようになりました。(Implemented by Raymond Hettinger; bpo-5032 .) itertools.combinations() および itertools.product() は、以前は入力のイテレート可能オブジェクトより大きい r に ValueError を返していました。これは... - https://man.mtool.work/python/3.14/whatsnew/2.7.html