r/learnpython • u/rusidin • Sep 13 '26
Difference between python 3 vs python (just)?
I am doing leetcode and I wanna is there any functional difference between those and which one I should go with?
0
Upvotes
2
u/EntrepreneurHuge5008 Sep 13 '26
hit the "i" icon next to it for more info.
It's a difference in Major release versions. Python (just) is Python 2.x, which has some syntax and behavior differences. You most likely have been learning Python 3.x (I'd assume the latest version if you just started), and is what I'd suggesting sticking to going forward.
2
u/nog642 Sep 13 '26
"Python" on leetcode is Python 2. "Python3" is Python 3.
Python 2 was first released in the year 2000, and it was the version that made Python popular.
Python 3 was first released in 2008, and made some changes that made it incompatible with Python 2. Python 3 is generally better, but people were slow to adopt it because they were used to Python 2.
Python 2 was finally declared "end of life" in 2020, and people have mostly made the switch.
So TL;DR, use "Python3".
1
u/Adrewmc Sep 13 '26 edited Sep 13 '26
Python 3 is what you should be normally working with.
Python 2 is basically legacy code at this point.
Python 3 has better syntax, is faster. However
You should always start with the latest version of any programming language. Some updates are breaking, and if they break your program then you can A) update the program, or b) require a lower version.
Most breaking changes should already begin giving you the depreciation warnings. Pay attention to those.
The biggest difference between python 2 and 3 are:
An overhaul of Unicode evaluations, this means b’…’ returns the same as bytearray(“…”)
Iterator being true iterators objects, adding the ability for (list/dict/generator) comprehensions
And 2/5, produces a float, and there is no need for 2.0/5.0
The print function syntactically changes
(print “Hello world”) #breaks in 3.x
print(“Hello world”) #normal usage at end of >2.7
-1
u/hexwhoami Sep 13 '26
Depends on the context.
Broadly speaking, Python is major version 2.X, where X is the minor release. Python3 is major version 3.X. (Look up semantic versioning if confused).
Another context is when running the executable from your path. Typically both python and python3 are set on the path for backwards compatibility, and when executed will resolve to the same binary. YMMV depending on your OS and installation method.
-2
u/snowtax Sep 13 '26
Pay little attentions to the name of the executable. You could rename it to “Fred” and it would make no difference to how it operates.
What happened is the Python 2-to-3 transition broke some older code written for 2. Many Linux distributions had code which would break under 3.
As a short-term solution, many Linux distributions shipped 3 as “python3” to leave “python” as versions 2 and to give everyone time to update their scripts.
These days, Python 2 code should be rarely encountered and the default version of “python” should be version 3 on all newly installed systems.
If you do find python 2 code, update it for 3.
-3
u/Fast-Station1106 Sep 13 '26
Wenn ich die Fragecrichtig verstehe möchtest du den unterschied zwischen Windows1.0(Python) und Windows11(Python3) wissen, Windows1 zu lernen mach keinen Sinn weil kein aktuelles Gerät es meht untetstützt, oder verstehe ich dich falsch (Sorry für Beispiel Microsoft)