Python 3.6.5 ドキュメント 検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 34 for sorted (0.027 sec.)
ソート HOW TO — Python 3.6.5 ドキュメント 16792
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python HOWTO » ソー ... イテラブルからソートしたリストを作成する組み込み関数 sorted() があります。 このドキュメントでは Python を使った ... ソートの基本 ¶ 単純な昇順のソートはとても簡単です: sorted() 関数を呼ぶだけです。そうすれば、新たにソートされ ... たリストが返されます: >>> sorted ([ 5 , 2 , 3 , 1 , 4 ]) [1, 2, 3, 4, 5] list.sort( ... 。この方法はリストをインプレースに変更します (そして sorted との混乱を避けるため None を返します)。多くの場合、 ...
https://man.plustar.jp/python/howto/sorting.html - [similar]
8.3. collections --- コンテナデータ型 — Python 3.6.5 ドキュメント 9235
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... c = Counter ( a = 4 , b = 2 , c = 0 , d =- 2 ) >>> sorted ( c . elements ()) ['a', 'a', 'a', 'a', 'b', 'b'] ... or k , v in s : ... d [ k ] . append ( v ) ... >>> sorted ( d . items ()) [('blue', [2, 4]), ('red', [1]), ( ... .. d . setdefault ( k , []) . append ( v ) ... >>> sorted ( d . items ()) [('blue', [2, 4]), ('red', [1]), ( ... ( int ) >>> for k in s : ... d [ k ] += 1 ... >>> sorted ( d . items ()) [('i', 4), ('m', 1), ('p', 2), ('s ...
https://man.plustar.jp/python/library/collections.html - [similar]
8.5. heapq --- ヒープキューアルゴリズム — Python 3.6.5 ドキュメント 8899
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ます)。ソートされた値にわたる iterator を返します。 sorted(itertools.chain(*iterables)) と似ていますが、イテレ ... を指定します: key=str.lower 以下のコードと同等です: sorted(iterable, key=key, reverse=True)[:n] heapq. nsmall ... を指定します: key=str.lower 以下のコードと同等です: sorted(iterable, key=key)[:n] 後ろ二つの関数は n の値が小 ... さな場合に最適な動作をします。大きな値の時には sorted() 関数の方が効率的です。さらに、 n==1 の時には min ...
https://man.plustar.jp/python/library/heapq.html - [similar]
What's New in Python 2.4 — Python 3.6.5 ドキュメント 8468
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... Raymond Hettinger.) 新たに追加されたビルトイン関数 sorted(iterable) はインプレイスなメソッド list.sort() と似 ... 8 , 3 , 2 , 4 , 1 , 6 , 5 ] >>> [ 10 + i for i in sorted ( L )] # usable in a list comprehension [11, 12, 1 ... original is left unchanged [9,7,8,3,2,4,1,6,5] >>> sorted ( 'Monty Python' ) # any iterable may be an input ... , 't', 'y', 'y'] >>> # List the contents of a dict sorted by key values >>> colormap = dict ( red = 1 , blue ...
https://man.plustar.jp/python/whatsnew/2.4.html - [similar]
10.1. itertools --- 効率的なループ実行のためのイテレータ生成関数 — Python 3.6.5... 8228
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... for indices in permutations ( range ( n ), r ): if sorted ( indices ) == list ( indices ): yield tuple ( poo ... indices in product ( range ( n ), repeat = r ): if sorted ( indices ) == list ( indices ): yield tuple ( poo ... く必要があります: groups = [] uniquekeys = [] data = sorted ( data , key = keyfunc ) for k , g in groupby ( da ... ol = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . sample ( range ( n ), r )) return tuple ...
https://man.plustar.jp/python/library/itertools.html - [similar]
5. データ構造 — Python 3.6.5 ドキュメント 8228
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python チュートリア ... トします。引数はソート方法のカスタマイズに使えます。 sorted() の説明を参照してください。 list. reverse ( ) リス ... 返します (ソートされたリストが欲しい場合は、代わりに sorted(d.keys()) を使ってください)。 [2] ある単一のキーが ... list ( tel . keys ()) ['irv', 'guido', 'jack'] >>> sorted ( tel . keys ()) ['guido', 'irv', 'jack'] >>> 'gui ... 3 1 シーケンスをソートされた順序でループするには、 sorted() 関数を使います。この関数は元の配列を変更せず、ソ ...
https://man.plustar.jp/python/tutorial/datastructures.html - [similar]
11.1. pathlib --- オブジェクト指向のファイルシステムパス — Python 3.6.5 ドキュ... 7972
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... あらゆる種類の) すべてのファイルを yield します: >>> sorted ( Path ( '.' ) . glob ( '*.py' )) [PosixPath('path ... ath('setup.py'), PosixPath('test_pathlib.py')] >>> sorted ( Path ( '.' ) . glob ( '*/*.py' )) [PosixPath('do ... えれば、再帰的な Glob 走査が可能という意味です: >>> sorted ( Path ( '.' ) . glob ( '**/*.py' )) [PosixPath('b ... に " ** " を追加して呼び出した場合と似ています: >>> sorted ( Path () . rglob ( "*.py" )) [PosixPath('build/li ...
https://man.plustar.jp/python/library/pathlib.html - [similar]
17.7. queue --- 同期キュークラス — Python 3.6.5 ドキュメント 7972
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... tack). With a priority queue, the entries are kept sorted (using the heapq module) and the lowest valued ent ... を持つ要素が最初に検索されます (最小の値を持つ値は、 sorted(list(entries))[0] によって返されるものです)。典型的 ...
https://man.plustar.jp/python/library/queue.html - [similar]
27.7. tracemalloc --- メモリ割り当ての追跡 — Python 3.6.5 ドキュメント 7972
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ferences with an old snapshot. Get statistics as a sorted list of StatisticDiff instances grouped by key_typ ... r , cumulative: bool=False ) ¶ Get statistics as a sorted list of Statistic instances grouped by key_type : ... acemalloc. Traceback ¶ Sequence of Frame instances sorted from the most recent frame to the oldest frame. A ...
https://man.plustar.jp/python/library/tracemalloc.html - [similar]
26.7. 2to3 - Python 2 から 3 への自動コード変換 — Python 3.6.5 ドキュメント 7797
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... e 1 は while True になります。また、適切な場所では sorted() が使われるようにします。例えば、このブロックは L ... _iterable ) L . sort () 次のように変更されます L = sorted ( some_iterable ) import ¶ 暗黙の相対インポート (s ...
https://man.plustar.jp/python/library/2to3.html - [similar]
PREV 1 2 3 4 NEXT