What version of Python should I use if I'm a new to Python?
If I'm absolutely new to Python and am literally reading about printing statements to console, variable types, collections, etc:
What version of Python should I use?
I'm aware that there is an abundance of 3rd party libraries for Python 2.6.x, but I'm scared I'll learn some things that won't carry over well into Python 3.
For example, in Python 3 you can use input(), in Python 2 you have to use raw_input().
Thank you very much for the information.
Solution 1:
Python 2.6 (and 2.5, 2.4) are what you will find installed on most machines (Linux) and what you will find most code written in. Therefore I'd start with Python 2.6.
Solution 2:
It's really going to depend on what you want to do. Generally speaking Python 3 "isn't ready yet", in the sense that few libraries support Python 3. This will end up greatly limiting what you can accomplish with the language as a beginner.
On the other hand, if you think you'll be spending your time on more "pure programming" tasks as you learn your way around, then Python 3 can be a good starting point, since things like strings
are wildly different in Python 3.
So, what do you want out of Python right now? Do you want to make useful things? Python 2.x. Do you want to learn about Python for the sake of learning about Python? Python 3.
Here in a year or two, Python 3 will likely start being the default choice. Until then, it's really up to you. But you can be certain that whatever skills in Python you pick up are going to be useful in 2.x and 3. Some important things changed in Python 3, but Python 3 is still Python.
Solution 3:
The latest 2.6. Don't worry about 3.x; there isn't that much to learn.
Solution 4:
one thread in SO you can take reference. Search SO for more if you have to.
I wouldn't worry too much on function differences. What's more important right now is to learn the language well. Read the documents on Python 3.0 and what's new in its features. When you know what's new, you will know what to do later on if you require to program in Python 3.0. For 2.6 (not sure about 2.5) , if you require the new print functionality, you can always do from __future__ import print
Solution 5:
Python 3 without any doubt. Today (1 Jan, 2020), the official support for Python 2.7 ends completely - https://github.com/python/devguide/pull/344.
Some major open source projects have committed to stop support Python 2 soon - https://python3statement.org/
If you have some Python 2 code which you want to run with Python 3, here is an official guide - https://docs.python.org/3/howto/pyporting.html
Start with the latest version of Python 3 (currently 3.8.1). Python 3 isn't backward-compatible with Python 2 on purpose because it implements a whole set of new features and clears up the clutter in Python 2 which wasn't really adding anything to the language - https://docs.python.org/release/3.8.1/whatsnew/3.0.html