Computer Science, asked by sidglad7777pdzvlo, 10 months ago

What are the differences between Python 1, 2, and 3? I need a explanation with it. And which is best to study and why​

Answers

Answered by sibi61
2

Hi buddy

Here is your answer

☑️ KEY DIFFERENCE Python 3 syntax is simpler and easily understandable whereas Python 2 syntax is comparatively difficult to understand. ... Python 3 value of variables never changes whereas in Python 2 value of the global variable will be changed while using it inside for-loop

Answered by 007692
1

Answer:

Python 1 refers to the first set of releases of the Python language. This was long ago and nobody uses or cares about these anymore.

Python 2 refers the the second line of releases of Python. Python 2.7.12 is the latest release in this line of releases.

Python 3 refers to the third major line of releases of Python. Python 3.5.2 is the latest release in this line of releases. Python 3 introduced several changes to the actual structure and syntax of the Python language, such that code written for Python 2 would not run under Python 3 without major changes (and vice versa).

For example, if you have a code base written in Python 2, it would not run in Python 3 without programmers needing to go through it and change certain portions.

All new features for the Python language are going into Python 3, but Python 2 still receives bug fixes and security patches. The reason Python 3 vs Python 2 is even an issue (e.g. the reason people don’t just all upgrade to Python 3) is that Python 2 is still widely used in the community. Many companies still have millions of lines of code written in Python 2.

A crude analogy would be that Python 2 is to Python 3 as Windows XP was to Windows Vista. Programs written for XP often didn’t work on Windows Vista (sometimes they did). Programs written for Windows Vista that took advantage of Window’s Vista’s fancy features (maybe the latest graphics features) definitely didn’t work on Windows XP. But lots of companies still stuck with Windows XP, so Microsoft still had to release security fixes for Windows XP for many years, even though all new features were developed for Windows Vista (and Windows 7, 8, 10, and so on).

Similar questions