Python pass list as command line argument code example
Example 1: how to take a list as input in python using sys.srgv
argv = sys.argv[1:]
Example 2: how to take list as command line arguments in python
>>> input = "[2,3,4,5]"
>>> map(float, input.strip('[]').split(','))
[2.0, 3.0, 4.0, 5.0]
>>> A = map(float, input.strip('[]').split(','))
>>> print(A, type(A))
([2.0, 3.0, 4.0, 5.0], <type 'list'>)