@Abha you are right about pre-installation of python, which is true in case of every Ubuntu version. Python comes pre-installed with Ubuntu. But in case you want to Update python to a newer version or if you have uninstalled it and want to Install it again, you can simply do that from Ubuntu terminal using following command:
>> sudo apt update
>> sudo apt install python3.6
The above command is to install python v-3.6. If you want to install any other version, use the following command:
>> sudo apt install python[version]
After installation, to check if python is installed properly, write following command into the terminal:
>> python3 -v
or
>> python2 -v
This will show the installed version along with other details about installed python version.