Create a database

Report a typo

We are going to create our first database with SQLite! Your task is to complete the code to create a database in RAM.
Assign the connection to the con variable, if the connection is correct, print the message Connection established: Database created in memory. If otherwise, print error to close the connection.

Write a program in Python 3
import sqlite3 as db


# your code here
try:
...

except db.Error as Error:
print(Error)
finally:
...
___

Create a free account to access the full topic