title: Python: String formatter to get underlined headline
body: <p>To structure my console output, I want to print some information and I would like to start with an underlined headline.
  But how to do it nicely without creating an extra variable?</p>
  
  <p>Right now I do it like this:</p>
  
  <pre><code>print("{:s}\n{:s}\n".format("This is an underlined headline.", len("This is an underlined headline.") * "-"))
  </code></pre>
  
  <p>what gives me the desired output:</p>
  
  <pre><code>This is an underlined headline.
  -------------------------------
  </code></pre>
  
  <p>But that code is bad. Is there some better format string to achieve that?</p>
  
  <pre><code>print("{0:s}\n?????\n".format("This is an underlined headline.", "-"))
  </code></pre>
  
  <p>Thank you :)</p>