Results of 1 - 10 of about 12 for student (0.008 sec.)
- ソートのテクニック — Python 3.14.8 ドキュメント 12664
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » ソートのテクニック テーマ 自動 ライト ダーク | ソートのテクニック ¶ Author : Andrew Dalke and Raymond Hettinger Python のリストにはリストをインプレ
...るからです。 よくある利用パターンはいくつかの要素から成る対象をインデクスのどれかをキーとしてソートすることです。例えば: >>> student_tuples = [ ... ( 'john' , 'A' , 15 ), ... ( 'jane' , 'B' , 12 ), ... ( 'dave' , 'B' , 10 ), ... ] >>> sorted ( student_tup...les , key = lambda student : student [ 2 ]) # sort by age [('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)] 同じテクニックは名前づけされた属性...(named attributes) を使うことでオブジェクトに対しても動作します。例えば: >>> class Student : ... def __init__ ( self , name , grade , age ): ... self . name = name ... self . grade = grade ... self . age = age ...... - https://man.mtool.work/python/3.14/howto/sorting.html
- ソートのテクニック — Python 3.14.8 ドキュメント 12664
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » ソートのテクニック テーマ 自動 ライト ダーク | ソートのテクニック ¶ Author : Andrew Dalke and Raymond Hettinger Python のリストにはリストをインプレ
...るからです。 よくある利用パターンはいくつかの要素から成る対象をインデクスのどれかをキーとしてソートすることです。例えば: >>> student_tuples = [ ... ( 'john' , 'A' , 15 ), ... ( 'jane' , 'B' , 12 ), ... ( 'dave' , 'B' , 10 ), ... ] >>> sorted ( student_tup...les , key = lambda student : student [ 2 ]) # sort by age [('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)] 同じテクニックは名前づけされた属性...(named attributes) を使うことでオブジェクトに対しても動作します。例えば: >>> class Student : ... def __init__ ( self , name , grade , age ): ... self . name = name ... self . grade = grade ... self . age = age ...... - https://man.mtool.work/python/3.14/howto/sorting.html
- __main__ --- トップレベルのコード環境 — Python 3.14.8 ドキュメント 9020
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » __main__ --- トップレベルのコード環境 テーマ 自動 ライト ダーク | __main__ --- トップレベルのコード環境
...ace for a package. Consider the following hypothetical package, "bandclass": bandclass ├── __init__.py ├── __main__.py └── student.py __main__.py will be executed when the package itself is invoked directly from the command line using the -m flag. For e...ture of the package you are writing, but in this hypothetical case, it might make sense to allow the teacher to search for students: # bandclass/__main__.py import sys from .student import search_students student_name = sys . argv [ 1 ] if len ( sys . a...rgv ) >= 2 else '' print ( f 'Found student: { search_students ( student_name ) } ' ) Note that from .student import search_students is an example of a relative impor... - https://man.mtool.work/python/3.14/library/__main__.html
- __main__ --- トップレベルのコード環境 — Python 3.14.8 ドキュメント 8808
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » __main__ --- トップレベルのコード環境 テーマ 自動 ライト ダーク | __main__ --- トップレベルのコード環境
...ace for a package. Consider the following hypothetical package, "bandclass": bandclass ├── __init__.py ├── __main__.py └── student.py __main__.py will be executed when the package itself is invoked directly from the command line using the -m flag. For e...ture of the package you are writing, but in this hypothetical case, it might make sense to allow the teacher to search for students: # bandclass/__main__.py import sys from .student import search_students student_name = sys . argv [ 1 ] if len ( sys . a...rgv ) >= 2 else '' print ( f 'Found student: { search_students ( student_name ) } ' ) Note that from .student import search_students is an example of a relative impor... - https://man.mtool.work/python/3.14/library/__main__.html
- struct --- バイト列をパックされたバイナリデータとして解釈する — Python 3.14.8 ... 8207
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » バイナリデータ処理 » struct --- バイト列をパックされたバイナリデータとして解釈する テーマ 自動 ライト ダーク | struct --- バイト列を
...08 ' >>> name , serialnum , school , gradelevel = unpack ( '<10sHHb' , record ) >>> from collections import namedtuple >>> Student = namedtuple ( 'Student' , 'name serialnum school gradelevel' ) >>> Student . _make ( unpack ( '<10sHHb' , record )) Stude... - https://man.mtool.work/python/3.14/library/struct.html
- struct --- バイト列をパックされたバイナリデータとして解釈する — Python 3.14.8 ... 8207
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » バイナリデータ処理 » struct --- バイト列をパックされたバイナリデータとして解釈する テーマ 自動 ライト ダーク | struct --- バイト列を
...08 ' >>> name , serialnum , school , gradelevel = unpack ( '<10sHHb' , record ) >>> from collections import namedtuple >>> Student = namedtuple ( 'Student' , 'name serialnum school gradelevel' ) >>> Student . _make ( unpack ( '<10sHHb' , record )) Stude... - https://man.mtool.work/python/3.14/library/struct.html
- 9. クラス — Python 3.14.8 ドキュメント 7888
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 9. クラス テーマ 自動 ライト ダーク | 9. クラス ¶ クラスはデータと機能を組み合わせる方法を提供します。 新規にクラスを作成することで、新し
...) # dot product 260 >>> unique_words = set ( word for line in page for word in line . split ()) >>> valedictorian = max (( student . gpa , student . name ) for student in graduates ) >>> data = 'golf' >>> list ( data [ i ] for i in range ( len ( data )... - https://man.mtool.work/python/3.14/tutorial/classes.html
- 9. クラス — Python 3.14.8 ドキュメント 7888
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 9. クラス テーマ 自動 ライト ダーク | 9. クラス ¶ クラスはデータと機能を組み合わせる方法を提供します。 新規にクラスを作成することで、新し
...) # dot product 260 >>> unique_words = set ( word for line in page for word in line . split ()) >>> valedictorian = max (( student . gpa , student . name ) for student in graduates ) >>> data = 'golf' >>> list ( data [ i ] for i in range ( len ( data )... - https://man.mtool.work/python/3.14/tutorial/classes.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.14.8 ドキュメ... 7694
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » functools --- 高階関数と呼び出し可能オブジェクトの操作 テーマ 自動 ライト ダーク | functools ---
...__le__() , __gt__() , or __ge__() . In addition, the class should supply an __eq__() method. 例えば: @total_ordering class Student : def _is_valid_operand ( self , other ): return ( hasattr ( other , "lastname" ) and hasattr ( other , "firstname" )) def... - https://man.mtool.work/python/3.14/library/functools.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.14.8 ドキュメ... 7694
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » functools --- 高階関数と呼び出し可能オブジェクトの操作 テーマ 自動 ライト ダーク | functools ---
...__le__() , __gt__() , or __ge__() . In addition, the class should supply an __eq__() method. 例えば: @total_ordering class Student : def _is_valid_operand ( self , other ): return ( hasattr ( other , "lastname" ) and hasattr ( other , "firstname" )) def... - https://man.mtool.work/python/3.14/library/functools.html