title: Pass a list of strings as parameter of a dependant task in Airflow
body: <p>I am trying to pass a list of strings from one task to another one via <a href="https://airflow.apache.org/concepts.html?highlight=xcom#xcoms" rel="noreferrer">XCom</a> but I do not seem to manage to get the pushed list interpreted back as a list.</p>
  
  <p>For example, when I do this in some function <code>blah</code> that is run in a <code>ShortCircuitOperator</code>:</p>
  
  <pre><code>paths = ['gs://{}/{}'.format(bucket, obj) for obj in my_list]
  kwargs['ti'].xcom_push(key='return_value', value=full_paths)
  </code></pre>
  
  <p>and then I want to use such list as a parameter of an operator. For example,</p>
  
  <pre><code>run_task_after_blah = AfterBlahOperator(
      task_id='run-task-after-blah',
      ...,
      input_paths="{{ ti.xcom_pull(task_ids='find-paths') }}",
      ...,
  )
  </code></pre>
  
  <p>I expect <code>input_paths</code> to be equal to <code>paths</code> but it does not because the rendering happens firs and then assignment, and somewhat the template rendering converts the <code>xcom_pull</code> return to a <em>stringified</em> list (and thereafter my <code>AfterBlahOperator</code> inserts assigns that as the value of an element in a JSON.</p>
  
  <p>I tried concatenating the <code>paths</code> into one string separated by some separator and pushing that to the XCom and then splitting that back when pulling from the XCom but as the XCom gets rendered first, I get, either that <em>stringified</em> list when the <code>split</code> function is called inside the template or the original concatenated string of <code>paths</code> if the <code>split</code> function is applied to the parameter (as in <code>"{{ ti.xcom_pull(task_ids='find-paths') }}".split(';')</code>.</p>
  
  <p>XCom seems to work great for single values as task parameters or multiple values when the extracted values can be further processed but not for multiple_values to convert into 'one' as parameter of a task.</p>
  
  <p>Is there a way to do this without having to write an extra function that precisely returns such list of strings?
  Or maybe I am abusing XCom too much, but there are many operators in Airflow that take a list of elements as parameter (e.g., usually the full path to multiple files that are the result of some previous task, hence not known beforehand).</p>