0

Please Explain the function of sys.argv

"command line arguments will be stored in the variable sys.argv "- explain .

8th Nov 2016, 8:24 AM
harjeevan singh
harjeevan singh - avatar
2 Respostas
+ 1
when you execute a python program in console what you write after the name of the code "python program.py arg1 arg2 ..." arg1, arg2 any number of strings that you write after program.py will be stored in a list of strings in sys.argv. So you can use that as an input.
8th Nov 2016, 11:38 AM
Nelson Daniel Durán Morel
Nelson Daniel Durán Morel - avatar
+ 1
thank you
8th Nov 2016, 12:00 PM
harjeevan singh
harjeevan singh - avatar