Python - what is the difference between these 3 methods of printing variables?
<p>I am trying to teach my friend Python and showed him 3 methods of printing variables of different types without the need for converting them to strings first, but he wants to know which one should he use and I don't know as I have not used Python in a long time so hopefully you can help us out:</p>

<pre><code>print("There are %d people in total" % num_people)
</code></pre>

<p>or</p>

<pre><code>print("There are", num_people, "people in total")
</code></pre>

<p>or</p>

<pre><code>print("There are {} people in total".format(num_people))
</code></pre>

<p>I know that the format method can do other, more powerful, string manipulation operations but other then that I am not sure which is the preferred method to use. I don't know why the first method exists as the 2nd seems simpler.</p>

<p>Any thoughts on this? Thank you!</p>