Which method out of the following is used to write a line of content in a CSV…
2023
Which method out of the following is used to write a line of content in a CSV file in a Python program?
- A.
writer
- B.
writerow
- C.
write
- D.
writeline
Attempted by 2189 students.
Show answer & explanation
Correct answer: B
In the csv module, writerow() writes one complete row (as a list/tuple) to a CSV file.