I just downloaded Python from python.org. I downloaded the 3.1 version. I was reading an ebook on python. I'm not sure If I am doing something wrong, but I can't even get a print statement right. In the IDLE, can I not type
Try placing parentheses around your string: print("Hello!"). I read that newer versions of Python prefer this method. You can look through the tutorials section right here on Dream.In.Code for Python tutorials. One you may find interesting is atik97's An Introduction To Python.
This post has been edited by Skaggles: 01 July 2010 - 05:11 PM
Python 3 deprecated many of the coding styles of Python 2. The two are not intended to be directly compatible. Additionally, many of the standard Python modules have been removed, renamed, or replaced. This will make learning Python 3 from a Python 2 book very difficult.
If you are learning Python from a book, you should ensure you are using the same major version of Python as the book. Python supports a side-by-side install with 2.x and 3.x, so it shouldn't be a problem.
And it is not a big deal either. Python 2 and Python 3 are being developed in parallel. That is to say, there are new versions of both Python 2.7 and Python 3.1 being released. Additionally, a large majority of Python programs are written for Python 2.x, as migrating them to Python 3.x would be a daunting task.
As I mentioned above, it would be my suggestion to uninstall Python 3.1, and install Python 2.7 while you are learning. This will make programming, finding modules, and searching for help on the internet much easier. Once you have a good grasp of Python, then you can address the issues associated with the different syntax of 3.x, migration, and parallel installs.
You have py3k installed but you work with py2k tutorials.
in py3k print is a function so you have to write print("blablabla") to get the thing done...
try diving into python 3 by ummm i dont know but his first name is mark. its a free ebook