Need help with programming.

William Tanksley wtanksle at dolphin.openprojects.net
Wed Oct 24 20:50:22 EDT 2001


On 24 Oct 2001 23:46:36 GMT, Django wrote:
>Hello. I've just begun using Python, and am now getting into simple commands.
>Everytime I try to use  "else:" I get this message:

>SyntaxError: invalid syntax
>>>> 

Could you please include some sample code?  "else:" is the correct word
and colon, so something else is wrong.

Let me give you a sample of correct code.

x=1
if x==3:
  print "good"
else:
  print "bad"

Paste in what you're typing in, and let's see how it differs.

>I've tried retyping it, skipping it, etc. but it's really bothering me...

Totally understood.

>an answer to my question, but I didnt find anything to help me out. Any
>help would be very much appreciated. Thank you.

You're welcome!  I hope we can help.

>May I remind you that I AM NEW TO PYTHON, and COMPUTER LANGUAGES ALL
>TOGETHER (Excluding HTML). I'M LEARNING PYTHON FOR SELF INTEREST, SO
>PLEASE NO FLAMES..

Are you under the impression that screaming at people you've never met is
socially commendable?

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list