title: Conditionally including additional characters using python string formatting
body: <p>Is it possible using python's string format to conditionally include additional characters along with the string variable only if the variable is not empty?</p>
  
  <pre><code>&gt;&gt;&gt; format_string = "{last}, {first}"
  &gt;&gt;&gt; name = {'first': 'John', 'last':'Smith'}
  &gt;&gt;&gt; format_string.format(**name)
  'Smith, John' # great!
  &gt;&gt;&gt; name = {'first': 'John', 'last':''}
  &gt;&gt;&gt; format_string.format(**name)
  ', John' # don't want the comma and space here, just 'John'
  </code></pre>
  
  <p>I would like to use the same<code>format_string</code> variable to handle any combination of empty or non-empty values for <code>first</code> or <code>last</code> in the <code>name</code> dict.</p>
  
  <p>What's the easiest way to do this in python?</p>