[Baypiggies] String Error Message

Simeon Franklin simeonf at gmail.com
Tue Jul 21 21:24:08 CEST 2015

Hey Hal -

I *strongly encourage* you not to spam many mailing lists simultaneously
with syntax questions. I'm guessing the 2015 Summer of Code mailing list in
particular is not an appropriate venue.

You might check out the https://mail.python.org/mailman/listinfo/tutor if
you want a list to ask questions on or try emailing individuals directly -
I'm happy to try to answer your python questions when I can.

In this case your for loop on line 10 needs a colon ":" at the end just
like like the one on line 4. Line 11 needs to be indented to be the body of
the for loop - just like you have an indented block starting on line 5.


On Tue, Jul 21, 2015 at 11:24 AM, <admin.dslcomputer at gmail.com> wrote:

> Hi Everyone:
> I'm trying to write a python program that prompts for a file name, then
> opens that file and reads through the file, looking for lines of the form:
> X-DSPAM-Confidence:    0.8475
> The program is designed to Count these lines and extract the floating
> point values from each of the lines and compute the average of those values
> and produce an output as shown below.
> However, line 10 displays the following string syntax error:
> SyntaxError: invalid syntax (<string>, line 10)
> The raw URL link to the code is available at
> http://tinyurl.com/oa7cppq
> You can download the sample data at
> http://www.pythonlearn.com/code/mbox-short.txt
> Regards,
> Hal
> Sent from Surface
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> https://mail.python.org/mailman/listinfo/baypiggies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150721/7d743de4/attachment.html>

More information about the Baypiggies mailing list