On 8 juin, 23:44, Deadly Dirk <d...@plfn.invalid> wrote: > I am a total beginner with Python. I am reading a book ("The Quick Python > Book", 2nd edition, by Vernon Ceder) which tells me that print function > takes end="" argument not to print newline character. I tried and here is > what happens: > > >>> print(x) > abc > >>> print(x,end="") > > File "<stdin>", line 1 > print(x,end="") > ^ > SyntaxError: invalid syntax > > What does the error message mean? I am using Python 2.6.5 on Ubuntu 9.10.
in python 2.6.5, print is a keyword and this syntax is not allowed print becomes a real function with few keywords arguments like "end" only since python 3.0 Daniel -- http://mail.python.org/mailman/listinfo/python-list