Writing in same row in Gujarati in python using CSV writer

Question:

My code:

import csv

# Create a list of Gujarati strings
strings = [['હેલો, વર્લ્ડ!', 'સુપ્રભાત', 'મારા નામ હેઠળ છે']]

# Open the CSV file in 'w' mode
with open('Gujarati.csv', 'w', encoding='utf-16',newline='') as f:
    # Create a CSV writer
    writer = csv.writer(f)

    # Write the strings to the CSV file

    writer.writerows(strings)


I am trying to write each heading as a different column, but I don’t know why it is getting in the same column. I want it to be in separate columns. I don’t know what else to write but feel free to ask me anything anytime.

I appreciate any help you can provideenter image description here

Asked By: Gaming Fury

||

Answers:

https://support.microsoft.com/en-us/office/import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba#:~:text=You%20can%20import%20data%20from,to%20import%2C%20and%20click%20Import.

Import or export text (.txt or .csv) files You can change the separator character used in both delimited and .csv text files. This may be necessary to ensure that the import or export operation works the way you want it to.

Answered By: Gaming Fury
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.