Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 2 or Python 3 as the student's first language [closed]

Which is more suited as the platform for a first course in computing: Python 2 or Python 3? Reason for asking your opinion: Python 2 is used in the vast majority of installations worlwide, but Python 3 is the coming thing.

like image 588
Victor H. Avatar asked Aug 19 '10 13:08

Victor H.


People also ask

Is it better to learn Python 2 or 3?

While Python 2 had its heyday in the early 2000s, Python 3 is the best choice to learn in 2022. You might find some circumstances in which you need to use Python 2, but on the whole, Python 3 is the most popular language. Since Python 2 was sunsetted in 2020, Python 3 has dominated the programming world.

What is the difference between Python 2 and Python 3?

Python 3 has an easier syntax compared to Python 2. A lot of libraries of Python 2 are not forward compatible. A lot of libraries are created in Python 3 to be strictly used with Python 3. Python 2 is no longer in use since 2020.

Do people still use Python 2?

Python was first released in 1991 by the Dutch programmer Guido van Rossum. Since then, it's gone through many changes. Today, there are three major versions of Python. Of those, only the last two versions — Python 2 and Python 3 — are still in use.

Why was Python 3 created?

Python 3.0 (also called "Python 3000" or "Py3K") was released on December 3, 2008. It was designed to rectify fundamental design flaws in the language – the changes required could not be implemented while retaining full backwards compatibility with the 2. x series, which necessitated a new major version number.


1 Answers

Teach them both (imho).

Teach the Python 2 (in the most pythonic way) and than present your students the 2to3 changes, and their meaning (print "string" => print("string") why?)

By the way, if you use 2.7 http://docs.python.org/dev/library/stdtypes.html#memoryview is an interesting new feature!

like image 129
Enrico Carlesso Avatar answered Sep 19 '22 18:09

Enrico Carlesso