Where is the syntax for the dict() constructor ?!

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sat Jul 7 08:58:01 CEST 2007


On Sat, 07 Jul 2007 08:32:52 +0200, Hendrik van Rooyen wrote:

>> erik,viking,"ham, spam and eggs","He said ""Ni!""","line one
>> line two"
>> 
>> That's 5 elements:
>> 
>> 1: eric
>> 2: viking
>> 3: ham, spam and eggs
>> 4: He said "Ni!"
>> 5: line one
>>    line two
> 
> Also true - What can I say - I can only wriggle and mutter...
> 
> I see that you escaped the quotes by doubling them up -

That's how Excel and the `csv` module do it.

> What would the following parse to?:
> 
>  erik,viking,ham, spam and eggs,He said "Ni!",line one
>  line two

Why don't you try yourself?  The `csv` module returns two records, the
first has six items:

1: erik
2: viking
3: ham
4:  spam and eggs
5: He said "Ni!"
6: line one

'line two' is the only item in the next record then.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list