I want to run python script on google cloud using android studio

ex: I have an android application which contain button and google cloud VM instance which has a python script.
I want when click button, the script is run and output send to storage.
how I can do that ?
I suppose you're running a linux-based distribution as your operating system. I think that you could do that by sending a command to the VM via ssh, and by using pipes in linux you could direct the output to a specific file.
Let's say you have your python script named script_one.py
With this command python3 script_one.py > output.txt you basically run the script and the output of it is stored in the file output.txt in the same directory where the python script is, now of course you could use absolute or relative path to redirect your output to another place.
Depending on the language you're developing your application in, this can be implemented in different ways.
How to run python script on google cloud using android studio?