title: How to assign query result value by column in django
body: <p>The output of mysql query in django is shown </p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def result():
      cursor = connection.cursor()
      try:
          cursor.execute("select b.date, a.value from t1 a join t2 b on a.id = b.id")
          result = cursor.fetchall()
      finally:
          cursor.close()
      return result
  </code></pre>
  
  <p><strong>result</strong></p>
  
  <pre><code>((datetime.date(2019, 4, 25), '8192'), (datetime.date(2019, 5, 25), '8192'), (datetime.date(2019, 6, 25), '8192'), (datetime.date(2019, 11, 25), '8192'))
  </code></pre>
  
  <p>I want to assign a value to a variable like this</p>
  
  <pre><code>x = data
  y = value
  </code></pre>
  
  <p>What should I do?
  Please let me know.</p>