Install python 3.10 on Ubuntu 20.04

Given the age of Ubuntu 20.04 vs Ubuntu 22.04, installing python3.10 in Ubuntu 20.04 requires reading from a PPA.  

Commands below will require sudo - but I'm not including it so that you don't copy and paste sudo commands!!!

apt install software-properties-common
software-properties-common will let us add a PPA
add-apt-repository ppa:deadsnakes/ppa
Add the deadsnakes PPA to your system's software repository list

apt-get update
Update the package index

apt-get install python3.10 python3.10-distutils python3-mysqldb python3.10-dev
Install python3.10

Note: you want to be careful when adding a PPA of developers you don't know. So why should you trust deadsnakes? Well, use at your own risk, but it's been run by Anthony Sottile and Felix Krull for years and is the most widely recommended way to install new versions of python.
https://askubuntu.com/questions/1398568/installing-python-who-is-deadsnakes-and-why-should-i-trust-them