title: Is there a way to use a column header in a database as a variable in Python?
body: <p>I'll preface this saying I'm pretty new to python.</p>
  
  <p>I have a database and need to access it using Python and SQLite. That's the easy part. I have created the table and column names etc, such as:</p>
  
  <pre><code>c.execute("CREATE TABLE Tanks \
  (ID INT PRIMARY KEY NOT NULL,\
  ...
  DIR_Radius INT NOT NULL,\
  DIR_Dish1 INT NOT NULL,\
  DIR_Dish2 INT NOT NULL,\
  DIR_Length INT NOT NULL,\
  </code></pre>
  
  <p>And so on. So what I want to do is use the column header as a variable, i.e.     </p>
  
  <pre><code>Dish1 = 'DIR_Dish1'
  </code></pre>
  
  <p>But as you may know in python that just assigns the string value to the variable name.</p>
  
  <p>Saying </p>
  
  <pre><code>Dir_Dish1 &gt; 0.001
  </code></pre>
  
  <p>Doesn't work either</p>
  
  <pre><code>def Dish_Vol():
  if (Dish &gt; 0.0001):
      int1 = math.pi * Dish,
      ...
  </code></pre>
  
  <p>I am trying to check that the value in the comlumn DIR_Dish1 has a integer value greater than 0.001, so that I can go ahead and perform some calculation. How do I go about using a variable as such?</p>