title: Don't understand cause of "IndexError: tuple index out of range" when formatting string
body: <p>I looked at similar questions having this <code>IndexError</code> but didn't find an explanation to my case. Can someone explain why I get the error?</p>
  <p>The following code</p>
  <pre><code>mySF2[0]=['000browser', '1', 'Floor', '0.92', '1.74', 'con', 'None']
  
  insertfmt = ' '.join([
  &quot;INSERT INTO mySchema.myTable_{}_name (col1, col2, col3, col4, col5, col6)&quot;,  
  &quot;VALUES ({}, {}, NULLIF({},'None')::decimal, NULLIF({},'None')::decimal, {}, NULLIF({},'None')::int)&quot;
           ])
  
  insertfmt.format(mySF2[0])
  </code></pre>
  <p>Gives this error</p>
  <pre><code>IndexError: tuple index out of range
  </code></pre>
  <p>However, I count 7 placeholders (i.e. curly brackets {}) and 7 items to input. Why the error then?</p>