r/learnpython • u/Waste-Foundation3286 • Dec 04 '24
difference between python and python3
im new to python, what are the key differences between those 2 ?
13
Dec 04 '24
In most cases today python and python3 are aliases for each other since python2 is EOL as of January 1st, 2020. You can verify that your python is at major version 3 by running python -V. If you'd like to know what the differences between python2 and python3 are the python3 release notes are a good place to start.
1
u/vincentlinden Dec 04 '24
"Python" may refer to version 2.* of Python, or "python2." Though use of python2 is discouraged, you will see the occasional organization that didn't want to do the work of converting. These companies are way out on a limb, because python2 is not supported any more. This means no bug fixes, and more importantly, no security fixes.
If you're learning Python, learn Python3. If you should land anywhere that is using python2, you will not have a lot of trouble learning the differences then and working with it. I don't think there's any point in learning python2 or the differences now. You will probably never need it.
1
u/georgehank2nd Jul 01 '25
"didn't want to do the work of converting"
Just FYI: converting (aka migrating, the usual term) costs money in a business context. Amd sometimes a lot. In addition, migrating can introduce errors, so migrating something business-critical is⦠not something you "want" to do. "Never change a running system". Or "if it ain't broke, don't fix it".
1
u/DesperateRadio7233 May 07 '25
On a windows computer in command prompt, when you install python, you are installing the only version of python on the computer and thus the command in the prompt is "python". However, for some UNIX-based operating systems such as Mac OS, when python installed, "python3" is the default for the operating system while the term "python" is used within the operating system as a symbolic link for compatibility with python 2 applications. Thus, by distinctly having python3, mac os allows for easier distinction between the older and newer python version (if both are installed on a single device for application compatibility reasons).
1
-9
Dec 04 '24 edited Dec 04 '24
[removed] β view removed comment
-8
25
u/ninhaomah Dec 04 '24
same as Windows vs Windows 11.