Saving the output of a python script into a variable

Hi all.

I have a Python script via the invoke code. It works and all, but I wanted to save the output of that script into a variable.

I know there is text that shows in the output window, and I could save the whole log but it is not recommended. So… how can I save this particular output?

you want to save logs of the Python script or you want to save the returned value of python code?

I think I have to use both of them.

One is for the text that appears when the code is executed

the other is for the one in openrpa log

image