On 17/01/22 4:18 am, Mats Wichmann wrote:
the convention for Excel, which is usually the reason
people are using csv, is you can enclose the entire comma-containing
field in "quote marks" (afaik it must be double-quote).
And to include a double quote in a field, quote the field and
double the d
On 1/15/22 13:56, Mahmood Naderan via Python-list wrote:
> Hi,
> I use the following line to write some information to a CSV file which is
> comma delimited.
>
> f = open(output_file, 'w', newline='')
> wr = csv.writer(f)
> ...
> f.write(str(n) + "," + str(key) + "\n" )
>
>
> Problem is that ke
Mahmood,
Ask yourself WHY you want to do what you are doing. Are you using the power and
features of the language or trying to do it step by step in the way that
earlier languages often made you do it?
Yes, there are ways to include commas in fields of a CSV file and they can lead
to complicatio
Right. I was also able to put all columns in a string and then use writerow().
Thanks.
Regards,
Mahmood
On Saturday, January 15, 2022, 10:33:08 PM GMT+1, alister via Python-list
wrote:
On Sat, 15 Jan 2022 20:56:22 + (UTC), Mahmood Naderan wrote:
> Hi,
> I use the following lin
On Sat, 15 Jan 2022 20:56:22 + (UTC), Mahmood Naderan wrote:
> Hi,
> I use the following line to write some information to a CSV file which
> is comma delimited.
>
> f = open(output_file, 'w', newline='')
> wr = csv.writer(f)
> ...
> f.write(str(n) + "," + str(key) + "\n" )
>
>
> Problem is
On 16/01/2022 09.56, Mahmood Naderan via Python-list wrote:
> Hi,
> I use the following line to write some information to a CSV file which is
> comma delimited.
>
> f = open(output_file, 'w', newline='')
> wr = csv.writer(f)
> ...
> f.write(str(n) + "," + str(key) + "\n" )
>
>
> Problem is that