title: How to pass an array from python to shell script and execute it?
body: <p>I have an array <code>HSPACE</code> which is defined inside a python script. I am trying to pass this array to a shell script "arraytest" and execute it from python itself. I am trying with the following piece of code but it doesnt seem to be working:</p>
  
  <pre><code>HSPACE=[0.01, 0.009, 0.008, 0.007]
  subprocess.call(["./arraytest"], HSPACE, shell=True)
  </code></pre>
  
  <p>The content of the shell script is:</p>
  
  <pre><code>#!/bin/bash
  for i in ${HSPACE[@]}
  do
  echo $i
  done
  </code></pre>