[Tutor] What is the python idiom to transfer Bash arrays to Python lists?

Jin Li lijin.abc at gmail.com
Mon May 10 22:36:15 EDT 2021


Hi,

I want to transfer Bash arrays into Python lists so that they can be
used in the python script. For example,

```Bash
arr1=(1 2 3)
arr2=(a b c)
# run main.py, and assign arr1 and arr2 to python list variables
```

What is the python idiom to do this? Thank you.

Best regards,
Jin


More information about the Tutor mailing list