问题
I am studying Python as a novice programmer. I have seen argv, as in sys.argv used and I believe it is used in other languages as well. What is the significance of the 'v' in 'argv'? What does it stand for and where does the term originate?
I am hoping this will help me understand and remember the use of "argv".
回答1:
The variables are named argc
(argument count) and argv
(argument vector) by convention, from C.
note that in Python there's no sys.argc
. You just use len(sys.argv)
as pointed fred-larson
来源:https://stackoverflow.com/questions/27363115/why-does-argv-have-a-v