Partially flattening a list
<p>This is probably a really silly question but, given the example code at the bottom, how would I get a single list that retain the tuples?</p>

<p>(I've looked at itertools but it flattens everything.)</p>

<p>What I currently get is:</p>

<blockquote>
  <p>('id', 20, 'integer')<br>
  ('companyname', 50, 'text')<br>
  <strong>[('focus', 30, 'text'), ('fiesta', 30, 'text'), ('mondeo', 30, 'text'), ('puma', 30, 'text')]</strong><br>
  ('contact', 50, 'text')<br>
  ('email', 50, 'text')</p>
</blockquote>

<p>Instead, I need a single level list:</p>

<blockquote>
  <p>('id', 20, 'integer')<br>
  ('companyname', 50, 'text')<br>
  <strong>('focus', 30, 'text')<br>
  ('fiesta', 30, 'text')<br>
  ('mondeo', 30, 'text')<br>
  ('puma', 30, 'text')</strong><br>
  ('contact', 50, 'text')<br>
  ('email', 50, 'text')</p>
</blockquote>

<p>Code:</p>

<pre><code>def getproducts():
    temp_list = []

    product_list = ['focus', 'fiesta', 'mondeo', 'puma']
    # usually this would come from a db

    for p in product_list:
        temp_list.append((p, 30, 'text'))
    return temp_list

def createlist():    
    column_title_list = (
       ("id", 20, "integer"),
       ("companyname", 50, "text"),
       getproducts(), 
       ("contact", 50, "text"),
       ("email", 50, "text"),
    ) 
    return column_title_list

for item in createlist():
    print item
</code></pre>
