see below example code.
Import csv
with open('csv_write_example_file.csv', 'w') as file:
file_writer=csv.writer(file, delimiter=',',quotechar='"')
file_writer.writerow(['Vijay s','designer', 'November'])
file_writer.writerow(['Raman','manager','march'])
Here we have imported writer object from CSV library. Opened the file in write mode. With the help of writer object we have written 2 rows of data.