· 2 years ago · Jan 14, 2023, 03:50 AM
1# Creating the table
2import sqlite3
3
4conn = sqlite3.connect('test.db')
5print("Opened database successfully");
6
7conn.execute('''
8CREATE TABLE IF NOT EXISTS team_data(
9 team text,
10 country text,
11 season integer,
12 total_goals integer);''')
13
14# Make sure data is stored into data base (something linke Ctrl+S when you're
15# saving your files in your)
16conn.commit()
17
18print("Table created successfully");
19
20conn.close()