I have written a Python module which contains functions that return arrays. I want to be able to access the string arrays returned from the python module, and iterate over i
This helps too. script.py:
a = ['String','Tuple','From','Python'] for i in range(len(a)): print(a[i])
and then we make the following bash script pyth.sh
#!/bin/bash python script.py > tempfile.txt readarray a < tempfile.txt rm tempfile.txt for j in "${a[@]}" do echo $j done
sh pyth.sh