shellscriptの配列で管理している値を、pythonの標準入力に渡してリストで扱う方法です
(ニッチかもですが)
shellscriptの配列
test.sh
arr=("100" "200" "300")
arr+=("400")
echo ${arr[@]}
pythonの標準入力に渡してリストで扱う
test.py
l = list(map(int, input().split()))
print(l)
実行(パイプで渡す)
$ bash test.sh
100 200 300 400
$ bash test.sh | python test.py
[100, 200, 300, 400]
これでOK(皆さんはどうやってるのでしょうか)