import sqlite3
con = sqlite3.connect("test.db")
cursur = con.cursor()
data = [(1, "Korea"), (2, "USA"), (3, "China"), (4, "Japan")]
cursor.execute("create table world(no, nation)")
cursor.executemany("insert into world values(?,?)", data)
print 'Last rowid:' + str(cursor.lastrowid)
print 'Row count:' + str(cursor.rowcount)
cursor.execute("select * from world")
for row in cursor:
print row[1]
cursor.execute("update world set nation='France' where no=4")
cursor.execute("select * from world")
print cursor.fetchall()
cursor.close()
db.commit()
db.close()