Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8495
| References | <c07a7df7-0e26-4884-a237-cc0a1f148056@q14g2000prh.googlegroups.com> |
|---|---|
| Date | 2011-06-27 18:19 +1100 |
| Subject | Re: Python basic program problem |
| From | Daniel Kluev <dan.kluev@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.439.1309159175.1164.python-list@python.org> (permalink) |
On Mon, Jun 27, 2011 at 6:05 PM, Amaninder Singh <asingh0412@gmail.com> wrote:
>>>> print "this is a test"
> SyntaxError: invalid syntax
Most likely, you are running python 3.x, while reading python 2.x book.
In python 3.x print is now ordinary function,
>>> print('hello world')
hello world
In future, please include full tracebacks and python version info.
--
With best regards,
Daniel Kluev
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python basic program problem Amaninder Singh <asingh0412@gmail.com> - 2011-06-27 00:05 -0700 Re: Python basic program problem Noah Hall <enalicho@gmail.com> - 2011-06-27 08:18 +0100 Re: Python basic program problem Daniel Kluev <dan.kluev@gmail.com> - 2011-06-27 18:19 +1100 Re: Python basic program problem Andrew Berg <bahamutzero8825@gmail.com> - 2011-06-27 02:24 -0500 Re: Python basic program problem Noah Hall <enalicho@gmail.com> - 2011-06-27 22:28 +0100
csiph-web