# -- code python 5.17
import pyodbc
server = 'azureni.database.windows.net'
database = 'Livres'
username = 'az'
password = 'Marbella64' 
driver= '{ODBC Driver 17 for SQL Server}'

with pyodbc.connect('DRIVER= '+ driver + '; SERVER=tcp:'+server+';PORT=1433;DATABASE='+database+';UID='+username+';PWD='+ password) as conn:
    with conn.cursor() as cursor:
        cursor.execute("SELECT auteur,titre FROM dbo.Livres")
        row = cursor.fetchall()
        for i in range(10):
            print(row[i])