import sqlite3
with sqlite3.connect('test_database.sqlite') as con:
c = con.cursor()
c.execute('''CREATE TABLE test_table
(date text, city text, value real)''')
for table in c.execute("SELECT name FROM sqlite_master WHERE type='table'"):
print("Table", table[0])
c.execute('''INSERT INTO test_table VALUES
('2017-6-25', 'bj', 100)''')
c.execute('''INSERT INTO test_table VALUES
('2017-6-25', 'pydataroad', 150)''')
c.execute("SELECT * FROM test_table")
print(c.fetchall())