Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert pyodbc.row to int list

This doesn't seem like it would be very difficult but I'm at a loss.

How can I take a pyodbc.row and convert it to a int list? This is driving my crazy.

like image 607
pastyj Avatar asked Oct 29 '15 21:10

pastyj


1 Answers

A simple list comprehension works for me:

row = crsr.fetchone()
row_as_list = [x for x in row]
like image 93
Gord Thompson Avatar answered Nov 07 '22 07:11

Gord Thompson