Question
Define connect() method.

Answer


Method to connect the database. This method accepts four parameters.
The syntax for connect() function and assigning the results to a variable is as follows:
[variable] = MySQLdb.connect([hostname], [username], [password], [database name])

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free