title: Return a list of values from Python Script to Jenkins Pipeline
body: <p>I have a jenkins pipeline which contains the following 3 stages(just description):</p>
  
  <p><strong>Stage 1:</strong> Calling a python script, that should return a list of version numbers for which a new release should be built</p>
  
  <p><strong>Stage 2:</strong> Call Jenkins-Jobs that do the built for every version number of Stage 1 in parallel.</p>
  
  <p><strong>Stage 3:</strong> After all built jobs have finished do other stuff with the built releases.</p>
  
  <p>The issue I got is, I don't know how to process the output of the python script. How can I use a list, that is returned from a python function for the following Stages? </p>
  
  <p>I call the python script via a <code>bat</code> command. I saw, there is the possibility to redirect the output of a batch command via <code>returnStdout</code> flag, but this only passes the output of the python script.</p>
  
  <p>One possiblity I can think of is to store the list in a json file in the workspace and then read it back in with <code>readJson</code> in the pipeline. But maybe there is a more elegant solution to this.</p>