Home > other >  End the problem given great god series
End the problem given great god series

Time:10-05

import CSV
Csv_file=open (' demo. CSV ', 'w', newline=' ')

Writer= CSV. Writer (csv_file)
# CSV here, please. The writer (csv_file), is a class or function, if why is the class writer first letter no capital

Writer. Writerow ([' movie ', 'douban score'])

Csv_file. Close ()

CodePudding user response:

CodePudding user response:

 def writer (fileobj, the dialect='excel', * * argv) : 
"" "csv_writer=CSV. Writer (fileobj [, the dialect='excel']
[optional keyword args])
For a row in the sequence:
Csv_writer. Writerow (row)

[or]

Csv_writer=CSV. Writer (fileobj [, the dialect='excel']
[optional keyword args])
Csv_writer. Writerows (rows)

The "fileobj" argument can be any object that supports The file API.
"" "
Return None

CodePudding user response:

Writer is function, is the CSV import file name,

The CSV file from _csv import writer,

In general source capitalize the first letter is in the class, but there are some is small, can control points in view,
  • Related