How can arguments be passed to the command line invocation of python? Using sys.argv had this interesting [but not helpful] result:
echo "a b c" | python -c "import sys;
print([[str(x),a] for x,a in enumerate(sys.argv)])"
[['0', '-c']]
>Solution :
Put the arguments after the -c option.
python -c "import sys;
print([[str(x),a] for x,a in enumerate(sys.argv)])" a b c
The pipe sends the strings to the scripts standard input, not arguments.