1#argv in python
2
3
4import sys
5
6print 'Number of arguments:', len(sys.argv), 'arguments.'
7print 'Argument List:', str(sys.argv)
8
9#command in cmd :
10$ python test.py arg1 arg2 arg3
11
12# producing following result :
13Number of arguments: 4 arguments.
14Argument List: ['test.py', 'arg1', 'arg2', 'arg3']