While working on Python-MySQL connectivity, fetchall() method is used to get…
2023
While working on Python-MySQL connectivity, fetchall() method is used to get data from table. The method fetchall() returns - Python-MySQL
- A.
a list / a list
- B.
a tuple / a tuple
- C.
tuple of lists / tuple of lists
- D.
list of tuples / list of tuples
Attempted by 1108 students.
Show answer & explanation
Correct answer: D
The fetchall() method in Python-MySQL returns a list of tuples . Each row from the table is returned as a tuple, and all such tuples are stored inside a list. Correct Answer: D — list of tuples