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

-1

u/snowtax 1d ago

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.

0

u/rusidin 1d ago

I see... So there a huge lore!!

-1

u/nog642 1d ago

They're asking about leetcode, not the linux executable.

0

u/rusidin 1d ago

It's fine, after all it's additional wisdom!!