title: Variable interpolation in Python
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3534803/unpythonic-way-of-printing-variables-in-python">Unpythonic way of printing variables in Python?</a>  </p>
  </blockquote>
  
  
  
  <p>In PHP one can write:</p>
  
  <pre><code>$fruit = 'Pear';
  print("Hey, $fruit!");
  </code></pre>
  
  <p>But in Python it's:</p>
  
  <pre><code>fruit = 'Pear'
  print("Hey, {0}!".format(fruit))
  </code></pre>
  
  <p>Is there a way for me to interpolate variables in strings instead? And if not, how is this more pythonic?</p>
  
  <p><em>Bonus points for anyone who gets the reference</em></p>