Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3789c63 commit 7502af8Copy full SHA for 7502af8
1 file changed
Doc/tutorial/stdlib.rst
@@ -65,11 +65,15 @@ Command Line Arguments
65
66
Common utility scripts often need to process command line arguments. These
67
arguments are stored in the :mod:`sys` module's *argv* attribute as a list. For
68
-instance the following output results from running ``python demo.py one two
69
-three`` at the command line::
+instance, let's take the following :file:`demo.py` file::
+
70
+ # File demo.py
71
+ import sys
72
+ print(sys.argv)
73
74
+Here is the output from running ``python demo.py one two three`` at the command
75
+line::
76
- >>> import sys
- >>> print(sys.argv)
77
['demo.py', 'one', 'two', 'three']
78
79
The :mod:`argparse` module provides a more sophisticated mechanism to process
0 commit comments