In brief
sys.argv contains program arguments, with the initial element describing the script or invocation. A supplied quantity such as 12 starts as text, not an automatically validated number.
Useful to know
sys.argv contains program arguments, with the initial element describing the script or invocation. A supplied quantity such as 12 starts as text, not an automatically validated number. [1]
A small example can read it after checking the argument count. For a more complex interface, argparse organizes conversion and help. An argument’s presence does not establish that its value is acceptable for the operation.
Sources
For further detail and to check the information: