Question: How are these code snippets properly ordered? #close the connection mycursor.close() mydb.close() A. # open a connection mydb mysql.connector.connect( host=localhost, user=myusername, password=mypassword, database=my database B.
How are these code snippets properly ordered?
#close the connection mycursor.close() mydb.close() A. # open a connection mydb mysql.connector.connect( host="localhost", user="myusername", password="mypassword", database="my database" B. # import the database driver import mysql.connector C. # execute a query my cursor mydb.cursor() mycursor.execute("SELECT * FROM customers") D. # retrieve and process the results myresult = mycursor.fetchall() for x in myresult: print(x) E
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
