Computer Science

Which of the following function is used with the csv module in Python to read the contents of a csv file into an object ?

  1. readrow()
  2. readrows()
  3. reader()
  4. load()

Python File Handling

1 Like

Answer

reader()

Reason — In the CSV module in Python, the reader() function is used to read the contents of a CSV file into an object. This function returns a reader object which can be used to iterate over the rows of the CSV file, where each row is represented as a list of strings. This allows to process the data contained within the CSV file.

Answered By

2 Likes


Related Questions