Quoting from docs.python.org:
\"sys.argv The list of command line arguments passed to a Python script. argv[0] is the script name (it is op
sys.argv
argv[0]
python -c executes a command passed on the command line, rather than a script from a file. sys.argv[0] will be set to "-c".
python -c
sys.argv[0]
"-c"
If you run a script with a -c flag, then yes, sys.argv[1] will be set to "-c" and sys.argv[0] will be set to the name of the script.
-c
sys.argv[1]