![]() This function takes a list of iterables as parameter and writes each item as a comma separated line of items in the file.įollowing example shows use of write() function. This function writes items in an iterable (list, tuple or string) ,separating them nby comma character. The writer class has following methods writerow() ![]() To prevent additional space between lines, newline parameter is set to ‘’. Every row written in the file issues a newline character. The function needs a file object with write permission as a parameter. This function in csv module returns a writer object that converts data into a delimited string and stores in a file object. The csv module in Python’s standard library presents classes and methods to perform read/write operations on CSV files. ![]() CSV (stands for comma separated values) format is a commonly used data format used by spreadsheets.
0 Comments
Leave a Reply. |