I am using Python3.6.
Database table example:
column1 . .column2 . .column3
....10 ...........20..............30
....100 ....... 200.............300
Code:
# extracts all data for the rows without the column names
rows=cursor.fetchall()
for row in rows:
print(row)
10 20 30
100 200 300
How do I add the column names manually to this loop so that it is included in the output?
I am new to stackoverflow so this post will need improvements in formatting, content, etc., so I welcome any feedback.
Thank you!