I will be giving a small course on the Python programming language to a group of interns this summer. As I am sure you know, there are many different versions of the Python language.I am wondering what to consider when choosing a particular version of the Python programming language. Is choosing the latest version of Python always the correct decision?
What to consider when choosing version of Python?
python
A few years ago, the answer to this would have been stick with Python 2; the libraries aren't ready for Python 3 yet. In many cases, that would have been a deal-breaker, because many of the older libraries were pretty useful, particularly for scientific computation.However, the story's a bit different now, in 2017. There isn't much of a reason to stick with Python 2; almost all of the top 360 libraries support it now.A few popular resources, like Learn Python the Hard Way, have remained ardently Python 2-only until recently (early 2017), and I suspect a lot of old tutorials haven't been updated.If you stay with Python 2, you miss out on all of the really nice features, like async and f-strings, which have only been added to the 3.x series.Something to consider, though: Python 2 and 3 are very similar, and learning one will mean you can relatively easily switch to the other. Python 3 just removes the major 'gotchas', like 5 / 2 = 2, or bad things happening when you use Unicode. For beginners, I think it's a great advantage for things to work intuitively (until, of course, you fight with the floating point representation issue).Generally, I don't think you'll experience any problems with Python 3, and it seems logical to me to learn the future of the language, rather than Python 2, which is legacy.