Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sqlite3 import connect
- from timeit import default_timer
- start = default_timer()
- for i in open('logs.txt', 'r'):
- log_date, log_code, log_path = i.split()
- cur.execute("INSERT INTO logs (date, code, path) VALUES ('{}','{}','{}')".format(log_date, log_code, log_path))
- conn.commit()
- cur.close()
- end = default_timer()
- print(end - start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement