formatメソッドは、任意の文字列で文章を穴埋めするためのメソッドです。通常の変数を足し算して文章を作る方法でも代用できます。
formatメソッド

formatメソッドを使うには、まず文章中の後で置き換えたい部分を{}で表現しておき、
#python
print("{}を出力".format("test"))
しかる後、文章の後ろにformat(置き換えたい内容)を追加します。

実行すると、formatで指定した文章が{}の中に挿入されます。

formatの文字列が変われば、置き換えられる文章が変化します。

formatで指定する文章は、変数を使用することもできます。
複数の文字列を指定
#python
名字 = "すな"
名前 = "ぎつ"
print("{}{}を出力".format(名字,名前))
複数使用の場合は、{}の数とformatで指定する文字列の数を一致させれば、

左から順番に{}の中に文字列が穴埋めされます。
文字列の足し算で代用

ここまでで行った処理は、文字列を足し算で連結することでも代用できます。
formatのほうが穴埋めであることが明示的ではあるので、使いやすいほうを使えばよいかと思います。
formatのほうが穴埋めであることが明示的ではあるので、使いやすいほうを使えばよいかと思います。

Python操作方法、関数・メソッドリファレンス
使用用途別にまとめたPythonリファレンスページです。
初期準備、基本概念
ダウンロード、インストール、起動
ShellとEditor、保存、実行
保存したPythonの起動
コメント、docstring、行またぎ
コメント、...
コメント