title: geonames-dump to sqlite python error 'dict_items' object does not support indexing
body: <p>I'm getting this error when running the python code from below</p>
  
  <pre><code>'dict_items' object does not support indexing
  </code></pre>
  
  <p><a href="https://github.com/commodo/geonames-dump-to-sqlite/blob/master/geonames_dump_to_sqlite.py" rel="nofollow">https://github.com/commodo/geonames-dump-to-sqlite/blob/master/geonames_dump_to_sqlite.py</a></p>
  
  <p>what the code does is get files from geonames and put the results in a sqlite database.</p>
  
  <p>it runs fine until creating the tables</p>
  
  <pre><code>def create_tables(cur):
      '''
      Create empty tables which will be populated later.
      '''
      for table_name in TABLE_MAPPINGS.values():
          cur.execute('DROP TABLE IF EXISTS %s' % table_name)
          table_fields = [ "%s %s" % table_field.listitems()[0] for table_field in TABLE_FIELDS ]
          cur.execute('CREATE TABLE %s (%s)' % (table_name, ','.join(table_fields)))
  </code></pre>
  
  <p>error specifics: </p>
  
  <pre><code>  line 111, in &lt;listcomp&gt;
      table_fields = [ "%s %s" % table_field.items()[0] for table_field in TABLE_FIELDS ]
  TypeError: 'dict_items' object does not support indexing
  </code></pre>