Python format() without {}
<p>I am working on python 3.6 64 bit.</p>

<p>Here is my code:</p>

<pre><code>days = "Mon Tue Wed Thu Fri Sat Sun"

print("Here are the days",format(days))
</code></pre>

<p>The output I got is </p>

<p>Here are the days Mon Tue Wed Thu Fri Sat Sun</p>

<p>I didn't add "{}" in my string. Also I used a comma "," instead of a dot "."</p>

<p>My understanding was that format() will replace {} in string with its arguments.</p>

<p>Question : How did format() worked without {} and . operator</p>

<p>The print function prints the arguments one right after the other, with a space in between. The <code>format</code> call, finding no replacements, is doing nothing and returning the original string.</p>

<p>Here are some examples that may help:</p>

<pre><code>&gt;&gt;&gt; colors = "Red Blue"
&gt;&gt;&gt; print("Here are the colors", format(colors))
Here are the colors Red Blue
&gt;&gt;&gt; print("", format(colors))
 Red Blue
&gt;&gt;&gt; print(format("abc"), format("xyz"))
abc xyz
&gt;&gt;&gt; print("Here are the colors", colors)
Here are the colors Red Blue
</code></pre>

python format