You can run Python under Termux if that suffices. If you want to write gui apps in python, look at kivy.org though it is maybe not so easy to use (I have not tried it).
Get a small laptop, really. Don't expect to code on a phone. You can run an sshd under termux and an ide on the laptop, I guess, to easily push code to the phone. You can even run emacs on the phone and use it through ssh (IDEs are for hipsters anyway). But what kinds of programs are these? If they don't have to run on the phone, a laptop with a normal dev environment will be a lot nicer.