+ 2
You can install termux.
Then install python and kivy library.
After that, create a kivy app and build it with buildozer to retrieve an .apk
This is valid for kivy/kivymd apps only.
I don't know another way to convert a .py file onto an .apk .
Or, just try to convert the .py code onto .c or .cpp code in order to use C4Droid to create an .apk
+ 1
I am afraid it's not possible to compile python code into an application. I had a few tries, but each of them ended with hitting the wall of something not supporting android devices.