Python: Standard Library - command line parameters

Common utility scripts often invoke the command-line parameters. These command line parameters as a list is stored in the variable argv sys module. Performed, for example "python command line demo.py after one two three" yields the following output:

import sys
print(sys.argv)
[‘demo.py’, ‘one’, ‘two’, ‘three’]

Guess you like

Origin blog.csdn.net/weixin_44523387/article/details/92162480
Recommended