i am trying to write fetchall result to csv file using writerow, using sqlite3 package of python
import sqlite3
import time,csv
s=time.time()
con = sqlite3.connect("dreamtool.db")
cur = con.cursor()
cur.execute("select * from result3")
result = cur.fetchall()
c = csv.writer(open("temp.csv","wb"))
c.writerow(result)
e=time.time()
con.close()
print(e-s)
i am getting error as a bytes-like object is required, not 'str'