What is sys.argv[1] in Python?


I am new to Python and seen many people using the sys.argv[1] in their code. What does it mean?

1 Answer

4 years ago by

It is a way of taking command line arguments.

for example, if you use

python test.py mani

The sys.argv[1] contains mani

4 years ago by Divya