Python Forum
iterate through query result
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iterate through query result
#2
I have tried something different:

print(jobs[14]) #### I just chose 14 as a point in the list. My output is :

('1918',)

HOW can I strip out the parenthesis, the single quotation marks, and the one comma...???

I tried using

ws['A1']=jobs[14] and I get an error. I tried using a fetchone() and it allowed me to insert a single data into the spreadsheet, but I could not figure out how to advance the next data with fetchone().
Reply


Messages In This Thread
iterate through query result - by bigt - Mar-25-2020, 06:16 PM
RE: iterate through query result - by bigt - Mar-25-2020, 07:55 PM
RE: iterate through query result - by deanhystad - Mar-25-2020, 08:03 PM
RE: iterate through query result - by bigt - Mar-25-2020, 08:14 PM
RE: iterate through query result - by deanhystad - Mar-25-2020, 09:28 PM
RE: iterate through query result - by bigt - Mar-25-2020, 11:12 PM
RE: iterate through query result - by bigt - Mar-26-2020, 02:27 PM
RE: iterate through query result - by deanhystad - Mar-26-2020, 03:53 PM
RE: iterate through query result - by buran - Mar-26-2020, 03:57 PM
RE: iterate through query result - by bigt - Mar-26-2020, 04:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Write SQLite query result to file hjk6734 1 2,722 May-27-2020, 12:17 PM
Last Post: menator01
  python code (embedded in Redshift) to return result of the query Mel 0 2,936 Aug-24-2018, 06:12 PM
Last Post: Mel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020