Advertisement
JojoBizarov

Untitled

Apr 18th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. from sqlite3 import connect
  2. from timeit import default_timer
  3.  
  4. start = default_timer()
  5. for i in open('logs.txt', 'r'):
  6.     log_date, log_code, log_path = i.split()
  7.     cur.execute("INSERT INTO logs (date, code, path) VALUES ('{}','{}','{}')".format(log_date, log_code, log_path))
  8. conn.commit()
  9. cur.close()
  10. end = default_timer()
  11. print(end - start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement