How to execute python code in UI Path
It’s being considered, for now you can use only vb.net in Invoke code:
If you’ve created a Python script that you would like to integrate with your automation, what I’ve done is bundle the Python script into an .exe using pyinstaller. Then you can run the script using the Run process activity.
Here is a detailed article on that