title: How to use str.format() with a dictionary in Python?
body: <p>What is wrong with this piece of code?</p>
  <pre><code>dic = { 'fruit': 'apple', 'place':'table' }
  test = &quot;I have one {fruit} on the {place}.&quot;.format(dic)
  print(test)
  
  &gt;&gt;&gt; KeyError: 'fruit'
  </code></pre>