回答編集履歴
1
update
answer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Python 2.x時代の
|
1
|
+
Python 2.x時代の古い文字列書式化方式です。互換性維持のため、Python 3.x系でも使えます。
|
2
2
|
|
3
|
-
http://docs.python.jp/3.6/library/stdtypes.html#printf-style-string-formatting
|
3
|
+
[http://docs.python.jp/3.6/library/stdtypes.html#printf-style-string-formatting](http://docs.python.jp/3.6/library/stdtypes.html#printf-style-string-formatting)
|
4
4
|
|
5
5
|
> 4.7.2. printf 形式の文字列書式化
|
6
6
|
> 文字列オブジェクトには固有の操作: % 演算子 (モジュロ) があります。この演算子は文字列 書式化 または 補間 演算子とも呼ばれます。`format % values` (format は文字列) とすると、format 中の % 変換指定は values 中のゼロ個またはそれ以上の要素で置換されます。この動作は C 言語における sprintf() に似ています。
|