import sqlite3 conn = sqlite3.connect( ':memory:' ) cursor = conn.cursor() cursor.execute( 'create table foo( a int )' ) cursor.executemany( 'insert into foo( a ) values( ? )', [ (1,), (2,) ] ) cursor.execute( 'select * from foo' ) cursor.next() cursor.close() cursor.next()