title: retrieving something from an sqlite database as an integer
body: <p>I have retrieved an integer from the currency column in my sqlite database. Then I want to add that integer to a variable in my program then put that integer back into the database.
  However, the problem is I can't get the retrieved variable to become an integer? Instead it's a tuple and I can't seem to remove the brackets around it.
  This is my code so far.</p>
  <pre><code>c.execute(&quot;SELECT currency FROM userinfo WHERE userId=?&quot;, (uid,))
  storedcurrency=c.fetchone()
  storedcurrency = re.sub(&quot;{|}|'|,|(|)|&quot;, '', storedcurrency)
  storedcurrency = int(storedcurrency)
  updatedcurrency = score + storedcurrency
  </code></pre>