English

What will be written inside the file test.csv using the following program import csv D = [['Exam'],['Quarterly'],['Halfyearly']]csv.register_dialect('M',lineterminator = '\n')with

Advertisements

Question

What will be written inside the file test.csv using the following program import csv

D = [['Exam'],['Quarterly'],['Halfyearly']]
csv.register_dialect('M',lineterminator = '\n')
with open('c:\pyprg\ch13\line2.csv', 'w') as f:
     wr = csv.writer(f,dialect='M')
     wr.writerows(D)
f.close()

Options

  • Exam Quarterly Halfyearly

  • Exam Quarterly Halfyearly

  • E
    Q
    H

  • Exam,
    Quarterly,
    Halfyearly

MCQ
Advertisements

Solution

Exam,
Quarterly,
Halfyearly

shaalaa.com
Writing Data into Different Types in CSV Files
  Is there an error in this question or solution?
Chapter 13: Python and CSV files - Evaluation [Page 265]
Advertisements
Share
Notifications



      Forgot password?
Use app×