Vidyalelo
Python · Q7

Database Connectivity with Python

Programming · Python · question 7

Q7

What is the purpose of the execute() method in the sqlite3 module?

A.
To print messages to the console
B.
To fetch data from a database
C.
To execute SQL queries on a database
Answer
D.
To create new tables in a database

Answer: Option C

Solution

Answer: Option C
Solution:
The execute() method is used to execute SQL queries on an SQLite database.