I will install latest version of Python using an external PPA repository. Follow the below command and install .
Open the Terminal and update the apt packages using below command.
$ sudo apt update
Now we will install prerequisite dependencies for Python using below command
$ sudo apt install software-properties-common
Add PPA repository to the Linux Mint base repository (this is external repository for installation)
$ sudo add-apt-repository ppa:deadsnakes/ppa
Now i will install Python current version of python is 3.11 .
$ sudo apt install python 3.11
At last we will verify is the python installed or not for this i will check using below command.
sudo python 3.11 --version
Thanks. Happy Coding.