Why does argv have a 'v'

人盡茶涼 提交于 2019-12-23 14:52:13

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!