While add-apt-repository may be a python script, apt is, and dpkg are not and should still work for you:
$ file $(which add-apt-repository) $(which apt) $(which apt-cache) $(which dpkg)
/usr/bin/add-apt-repository: Python script, ASCII text executable
/usr/bin/apt: ELF 64-bit LSB pie executable, x86-...
/usr/bin/apt-cache: ELF 64-bit LSB pie executable, x86-...
/usr/bin/dpkg: ELF 64-bit LSB pie executable, x86-
You can use apt to re-install / reconfigure the broken package including some broken links. I'm on Debian Testing, but the core python packages for Debian and Ubuntu are maintained by the same person, so I suspect it's similar for you. Here I'm looking for the relevant packages:
$ ls -lgo $(which python3)
lrwxrwxrwx 1 root root 9 Dec 23 07:05 /usr/bin/python3 -> python3.9
$ dpkg -S $(which python3) $(which python3.9)
python3-minimal: /usr/bin/python3
python3.9-minimal: /usr/bin/python3.9
$ apt-cache show python3 | grep Depends:
Depends: python3.9 (>= 3.9.1-1~), libpython3-stdlib (= 3.9.1-1).
Pre-Depends: python3-minimal (= 3.9.1-1)
$ apt-cache show python3.9 | grep Depends:
Depends: python3.9-minimal (= 3.9.1-4)...
Now we know which packages handle this link and the binaries associated with it. In your case, you are on Ubuntu 20.04, so you'll want python3.8-minimalpython3.8 instead of python3.9-minimalpython3.9.
$ sudo update-alternatives --config python3
update-alternatives: error: no alternatives for python3
ThatIf you get the same thing, it means alternatives no longer manage python3. I'm not sure when this changed, butif you don't get this could beit's probably why there's a problem on your machine. If you run this command When an old python3 version was removed, the prerm responsible for update-alternatives --remove python3 was never run. Try running update-alternatives --config python3 and check what options are available. If you have python3.8 as an option, and it's the highest priority, then rerun this as sudo and select auto.
$ sudo update-alternatives --config python3
There are 3 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3.8 1111 auto mode
1 /usr/bin/python3.5 1101 manual mode
2 /usr/bin/python3.8 1111 manual mode
3 /usr/bin/python3.7 1081 manual mode
However, I suspect python3.8 is not in your list and this is why you are having problems. Even with Debian buster (released in 2018), we had python3.7 so python3.5 is pretty old. Since the pythonpython3 packages now manage links on their own, when you ran update-alternatives --config python3 you probably replaced the good link with something that's out of date. In this case, I'd manually remove the python3 alternative with: