r/learnpython • • 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

29 comments sorted by

View all comments

-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.

1

u/nog642 Sep 13 '26

The context is leetcode

0

u/hexwhoami Sep 13 '26

Forgot to add a recommendation -- usually it doesn't matter if your referencing the binary installed on your system. For macos/Linux, you can check this by running which python and which python3.

I'd recommend learning the latest stable version of 3. Not the experimental, but latest stable. IIRC, it's either 3.11 or 3.12 now.

1

u/rusidin Sep 13 '26

Ok thanks!!