%演算子を使うと、printfのように書式を指定して標準出力できる。
とほほのPython入門 - 数値・文字列・型
Python String Interpolation with the Percent (%) Operator
文字列、整数値、16進数、実数
$ vi percent_operator.py $ python percent_operator.py ABCDE: 123 a: 0.120000 $
このように出力できた。
%演算子を使うと、printfのように書式を指定して標準出力できる。
とほほのPython入門 - 数値・文字列・型
Python String Interpolation with the Percent (%) Operator
文字列、整数値、16進数、実数
$ vi percent_operator.py $ python percent_operator.py ABCDE: 123 a: 0.120000 $
このように出力できた。