It's not clear what DB you use and what package/connector is used to connect. Also, after you initial code it's not clear if you do any changes.
generally you may control what is returned by when you query the database -tuple, dict, namedtuple...
e.g. for MySQL connector https://dev.mysql.com/doc/connector-pyth...ursor.html
of course, the option to simply work with dict.values() is also possible as suggested by @deanhystad
generally you may control what is returned by when you query the database -tuple, dict, namedtuple...
e.g. for MySQL connector https://dev.mysql.com/doc/connector-pyth...ursor.html
of course, the option to simply work with dict.values() is also possible as suggested by @deanhystad
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs