4 ms·
I'm on the outside looking in but practically speaking, why couldn't I "just use Python 3" then for everything?
by Yhippa 7y ago
I'm on the outside looking in but practically speaking, why couldn't I "just use Python 3" then for everything?
- gvb 7y agoPython 2 and 3 are different compiler/interpreters. Python 2 code might run on a Python 3 interpreter, but probably not. When you run your python2 code, you can specify that it is to run on the Python 2 compiler/interpreter. The Python 2 compiler/interpreter will continue to run and thus be able to run python2 code for a very long time. Ubuntu 18.04 example: $ python --version Python 2.7.15+ $ python2 --version Python 2.7.15+ $ python3 --version Python 3.6.8 $ ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 Apr 16 2018 /usr/bin/python -> python2.7