title: Unpack a list in Python
body: <p>Say I have a MySQL table I access through MySQLDB. I have a standard </p>
  
  <pre><code>SELECT statement:
  sql = "SELECT * FROM EMPLOYEE \
         WHERE INCOME &gt; '%d'" % (1000)
  </code></pre>
  
  <p>I then execute it with the cursor and pluck out the columns as below.</p>
  
  <pre><code>   cursor.execute(sql)
     results = cursor.fetchall()
     for row in results:
        fname = row[0]
        lname = row[1]
        age = row[2]
        sex = row[3]
        income = row[4]
  </code></pre>
  
  <p>Is it possible to assign all the column names in a single statement? Something like:</p>
  
  <pre><code>for row in results:
      fname, lname, age, sex, income = unpack(row)
  </code></pre>
  
  <p>I could always do:</p>
  
  <pre><code>fname, lname, age, sex, income = row[0], row[1], row[2], row[3], row[4]
  </code></pre>
  
  <p>But I have over 30 columns in my table and this is getting painful.
  Note that though I'm using MySQL right now, I'd like this to be as DB agnostic as possible; our benevolent overlords might decide to port everything over to another database at any point.</p>