Hello Richard, On Sun, Aug 5, 2012 at 8:40 AM, Richard Hendricks <richardhendricks@yahoo.com> wrote:
Hello, Looks like there has been a format change in a recent version that has not propagated to documentation?
This documentations is for Python 2.7, but...
has example
hello = "This is a rather long string containing\n\ several lines of text just as you would do in C.\n\ Note that whitespace at the beginning of the line is\ significant."
print hello
However, when I try to use that in a plain 3.2.3 install on a PC:
...you're running Python 3.2. First of all, you'd have to look at the right doc: http://docs.python.org/py3k/
hello = "This is a rather long string containing\n\ ... several lines of text just as you would do in C.\n\ ... Note that whitespace at the beginning of the line is\ ... significant."
print hello File "<stdin>", line 1 print hello ^ SyntaxError: invalid syntax
and to clarify, in Python 3.x print() has become a function, so you have to pass what you want to print as argument to print(). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi