O'Reilly Forums: Ch.2, Pg. 56 - Tab Stop - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Ch.2, Pg. 56 - Tab Stop Invalid syntax error

#1 User is offline   njordan2001 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 05-February 12

Posted 05 February 2012 - 11:36 AM

 print("\t", end='') 


This is not working!! I'm getting this error:
  File "pg56.py", line 8
    print("\t", end = ' ')
                    ^
SyntaxError: invalid syntax


Any ideas, PLEASE??!!
0

#2 User is offline   paulbarry 

  • Active Member
  • PipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 199
  • Joined: 20-August 09

Posted 05 February 2012 - 11:52 AM

You will typically see this error if you are using Python 2 instead of Python 3. Make sure you are running the code in Python 3.

Hope this helps.

Paul.
0

#3 User is offline   njordan2001 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 05-February 12

Posted 05 February 2012 - 12:16 PM

View Postpaulbarry, on 05 February 2012 - 11:52 AM, said:

You will typically see this error if you are using Python 2 instead of Python 3. Make sure you are running the code in Python 3.

Hope this helps.

Paul.


Thank you Paul! And thanks for the quick response!

I was running 2.7.1, based on an online tutorial's suggestion.... I'm thinking I might have to go back to the start of the book and re-read, paying more attention to information about using IDLE.

Thanks again Paul!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users