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

  1. A.

    a list / a list

  2. B.

    a tuple / a tuple

  3. C.

    tuple of lists / tuple of lists

  4. 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

Explore the full course: Rssb Senior Computer Instructor