The print function you're trying to use is for python 3 version only, If you want to keep reading the book, install python 3, else take a book that covers python 2.x syntax<br><br><div class="gmail_quote">2010/6/8 Deadly Dirk <span dir="ltr"><dirk@plfn.invalid></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I am a total beginner with Python. I am reading a book ("The Quick Python<br>
Book", 2nd edition, by Vernon Ceder) which tells me that print function<br>
takes end="" argument not to print newline character. I tried and here is<br>
what happens:<br>
<br>
>>> print(x)<br>
abc<br>
>>> print(x,end="")<br>
  File "<stdin>", line 1<br>
    print(x,end="")<br>
               ^<br>
SyntaxError: invalid syntax<br>
>>><br>
<br>
What does the error message mean? I am using Python 2.6.5 on Ubuntu 9.10.<br>
<br>
<br>
--<br>
The missionaries go forth to Christianize the savages -<br>
as if the savages weren't dangerous enough already.<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>