[Tutor] What's the invalid syntax? Code supplied

Nathan Pinno falcon3166 at hotmail.com
Thu Aug 4 03:48:40 CEST 2005


The only thing I see there is [0] and [1]. Should that be passcard instead?
----- Original Message ----- 
From: "Danny Yoo" <dyoo at hkn.eecs.berkeley.edu>
To: "Nathan Pinno" <falcon3166 at hotmail.com>
Cc: "Tutor mailing list" <tutor at python.org>
Sent: Wednesday, August 03, 2005 7:36 PM
Subject: Re: [Tutor] What's the invalid syntax? Code supplied


>
>
> On Wed, 3 Aug 2005, Nathan Pinno wrote:
>
>> What wrong with the following syntax?
>>
>> 
>> out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n")
> [text cut]
>> It highlighted the last " if that will help any.
>
>
> Take a close look at the end of the line.  Here, I'll underline it:
>
>    out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n")
>                                                  ^^^^^^^^^^^^^^^^^^^^^
>
> Do you see anything unusual there?
>
> 


More information about the Tutor mailing list