[Tutor] Syntax error with if statement
Andre Engels
andreengels at gmail.com
Wed Aug 24 20:08:25 CEST 2011
On Wed, Aug 24, 2011 at 7:40 PM, Ray Parrish <crp at cmc.net> wrote:
> Hello,
>
> I haven't been programming for a while and today I am working on something
> and have encountered an error I cannot figure out.
>
> Here is my code:
>
> thisFile = column[6]
> if thisFile == "/Images/My%20Face.JPG"
> CallCount += 1
> print CallCount
>
> And here is the error message:
>
> ray at RaysComputer:~$ python /home/ray/EmailCount/**CountEmails.py
> File "/home/ray/EmailCount/**CountEmails.py", line 41
> if thisFile == "/Images/My%20Face.JPG"
> ^
> SyntaxError: invalid syntax
>
> Any help you can be will be much appreciated.
>
There has to be a : at the end of an if statement, or more generally, any
statement that is to be followed by an indented block.
--
André Engels, andreengels at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110824/3acb5022/attachment.html>
More information about the Tutor
mailing list