Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does argv have a 'v'

Tags:

python

argv

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".

like image 830
markmacw Avatar asked Dec 08 '14 17:12

markmacw


1 Answers

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

like image 62
Thomas Ayoub Avatar answered Sep 28 '22 19:09

Thomas Ayoub