TecAdmin published a tutorial about how to switch the Python version in Ubuntu and Debian.
How to Switch Python Version in Ubuntu & Debian
Python is a high-level programming language, widely used for system programming. It is available for all popular operating systems. You can install more than one Python version on a single system. Once you have installed multiple Python versions, you can switch the default Python with the update-alternatives tool.