Skip to content

Instantly share code, notes, and snippets.

View AthosFB's full-sized avatar
🤓
Studying

Athos F. Bernardo AthosFB

🤓
Studying
View GitHub Profile
from random import randint
cont = 0
def mysql(a, b, database):
import mysql.connector
cnx = mysql.connector.connect(user='root', password='', host='127.0.0.1')
mycursor = cnx.cursor()
mycursor.execute(f"use {database}")
mycursor.execute(f"insert into {a} value('{b}');")