CBSE Class 12 Computer Science Question 25 of 47

Interface Python with SQL — Question 3

Back to all questions
3
Question

Question 3

Why do we use connect() function?

Answer

The connect() function is used to establish a connection to the MySQL database from a Python application. It returns a MySQLConnection object, which we can then use to perform various operations on the MySQL database.