I don't think this possible on the out of box experience. You select your language; you're essentially configuring the app service what process the host is going to spin up. There are one or two ways to get around this though:
- Configure your python program as a web job and use a webhook to trigger the job from your application. This isn't the preferred way to because web job is only supported on Windows and most recent Python runtimes are not supported on that platform.
- Use your own custom container image configured as your local system.
- Move the Python app to an Azure Function app with a HTTP trigger and use your app service to call that endpoint.