Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 2, 2019 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/3a348b0dd9835fb985361f04b6fef568 to your computer and use it in GitHub Desktop.
Save parzibyte/3a348b0dd9835fb985361f04b6fef568 to your computer and use it in GitHub Desktop.
import sqlite3
try:
bd = sqlite3.connect("libros.db")
cursor = bd.cursor()
sentencia = "SELECT * FROM libros;"
cursor.execute(sentencia)
libros = cursor.fetchall()
print(libros)
except sqlite3.OperationalError as error:
print("Error al abrir:", error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment