代码之余,将开发过程中经常用的代码片段备份一下,如下的代码是关于python在sqlite动态创建表的代码,应该能对各位有所用。

import sqlite3 as db

conn = db.connect('mytest.db')
cursor = conn.cursor()
cursor.execute("create table person(name text, age text, address text)")
print("table created")





相关文章: