'Converting PYODBC output into an int

Pulling data from a SQL query that gives me 1 number that is stored in a PYODBC row. I want to then add that number to another variable in the file. Pseudocode below -

 prev = 5
 cursor.execute("select statement")
 pulledNumber = cursor.fetchall()
 value = [row[2] for row in pulledNumber]

 final = prev + value

Getting a type error (list and int operation). Tried to cast the list to an int a few different ways but could not get it to work



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source