Question 75

Which method out of the following is used to write a line of content in a CSV file in a Phython program?

  1. AWriter
  2. BWriterow
  3. CWrite
  4. DWriteline
Show answerHide answer

Correct answer: (B) Writerow

Explanation

The csv writer object's writerow() method writes one row (line) to a CSV file. writerows() writes several rows.

From DSSSB TGT Computer Science Practice Set 2

This is question 75 of DSSSB TGT Computer Science Practice Set 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.