Secret Recipes of the Python Ninja
上QQ阅读APP看书,第一时间看更新

How it works...

Calling python2 or python3 opens the latest installed version of the respective branch, whereas the other examples show how to invoke a specific version number. Regardless of whether a newer version is available from the Python site, only versions that are installed on the system are available for use.

This is beneficial, because a developer may have to support legacy software and some features of those programs may not be compatible with newer Python versions. Thus, being able to call a specific version ensures that the developer is using the correct environment.