import sqlite3
try:
sqliteConnection = sqlite3.connect('test.db')
cursor = sqliteConnection.cursor()
print("SQLITE Connection Established!")
cursor.close()
except sqlite3.Error as error:
print("Error while connecting to sqlite", error)
finally:
if (sqliteConnection):
sqliteConnection.close()
print("Connection closed")