per page, with , order by , clip by
Results of 1 - 3 of about 3 for knights (0.002 sec.)
pprint --- データの整形表示 11924
pprint --- データの整形表示 ソースコード: Lib/pprint.py pprint モジュールは、任意の Python データ構造を、インタープリタへの入力に使える形式で「整形表示」する機能を提供します。 整形するデータ構造に Python の基本的な型以外のオブジェクトが含ま ... うでなければアンダースコアは表示されません(デフォルト)。 >>> import pprint >>> stuff = [ 'spam' , 'eggs' , 'lumberjack' , 'knights' , 'ni' ] >>> stuff . insert ( 0 , stuff ) >>> pprint . pp ( stuff ) [<Recursion on list with id=...>, 'spam', 'eggs', 'lu ... mberjack', 'knights', 'ni'] Added in version 3.8. バージョン 3.10 で変更: underscore_numbers 引数が追加されました。 バージョン 3.11 で変更: sy ... れ以外の整形は行いません。 >>> pprint . saferepr ( stuff ) "[<Recursion on list with id=...>, 'spam', 'eggs', 'lumberjack', 'knights', 'ni']" PrettyPrinter オブジェクト class pprint. PrettyPrinter ( indent = 1 , width = 80 , depth = None , stream = None , ...
https://man.mtool.work/python/3.14/library/pprint.html
5. データ構造 7980
5. データ構造 この章では、すでに学んだことについてより詳しく説明するとともに、いくつか新しいことを追加します。 5.1. リスト型についてもう少し list 型には、他にもいくつかメソッドがあります。リストオブジェクトのすべてのメソッドを以下に示します ... ループのテクニック 辞書に対してループを行う際、 items() メソッドを使うと、キーとそれに対応する値を同時に取り出せます。 >>> knights = { 'gallahad' : 'the pure' , 'robin' : 'the brave' } >>> for k , v in knights . items (): ... print ( k , v ) ... gallaha ...
https://man.mtool.work/python/3.14/tutorial/datastructures.html
7. Input and Output 7980
7. Input and Output プログラムの出力方法にはいくつかの種類があります。 データを人間が読める形で出力することもあれば、将来使うためにファイルに書くこともあります。 この章では、こうした幾つかの出力の方法について話します。 7.1. Fancier Output F ... Method str.format() メソッドの基本的な使い方は次のようなものです: >>> print ( 'We are the {} who say " {} !"' . format ( 'knights' , 'Ni' )) We are the knights who say "Ni!" 括弧とその中の文字(これをフォーマットフィールドと呼びます)は、 str.format() メ ...
https://man.mtool.work/python/3.14/tutorial/inputoutput.html
PREV 1 NEXT