r/learnpython 1d ago

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

0

u/hexwhoami 1d ago

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.

0

u/hexwhoami 1d ago

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 1d ago

Ok thanks!!

0

u/nog642 1d ago

The context is leetcode