For Debian Testing run the following:
Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust (more information).
echo 'deb http://download.opensuse.org/repositories/home:/unit193:/deadsnake/Debian_Testing/ /' | sudo tee /etc/apt/sources.list.d/home:unit193:deadsnake.list
curl -fsSL https://download.opensuse.org/repositories/home:unit193:deadsnake/Debian_Testing/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_unit193_deadsnake.gpg > /dev/null
sudo apt update
sudo apt install python2.7
For Debian 12 run the following:
Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust (more information).
echo 'deb http://download.opensuse.org/repositories/home:/unit193:/deadsnake/Debian_12/ /' | sudo tee /etc/apt/sources.list.d/home:unit193:deadsnake.list
curl -fsSL https://download.opensuse.org/repositories/home:unit193:deadsnake/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_unit193_deadsnake.gpg > /dev/null
sudo apt update
sudo apt install python2.7