answersLogoWhite

0


Best Answer

sys.argv is a way to access command line arguments in Python. sys.argv is an array of all the command line parameters, where the first value is the name of the file being run.

For example, let's say you have a python script named example.py that looks like this:

import sys

print(sys.argv)

This script will simply print the command line parameters in an array. If, for example, you run the script from a command line as

python example.py param1 param2

the output will be

['example.py', 'param1', 'param2']

User Avatar

Wiki User

βˆ™ 9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does sys.argv do on python?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a Python that starts with the letter R?

Reticulated Python


How a python reproduces?

In a python


What is a boa or a python?

a python


Is there such thing as a bull python?

The ball python is only one type of Python. As I don't know which other type of python you're asking me to compare the ball python with I can't really answer your question...


Ho mutch does a python weigh?

the record for a python is 145 kgs from a reticulated python.


What is the Indian python's scientific name?

The scientific name of the Indian python is Python molurus.


What is ball python in latin?

Python Regius, which translates to "Royal Python," its original name.


What is a sentence with the word python?

The python looked scary.My best friend had a pet python.


What is a white ball python called?

A white ball python could be any of the white pythons. Those are the Blue-Eyed Leucistic Ball Python, Ivory Ball Python, Hypo Ivory Ball Python and the Piebald Ball Python.


Was a 49 foot python ever been caught in the wild?

No. The largest verified record for a python is 33ft for Python reticulatus (Reticulated Python).


What is a Python's diet?

Small Python's Diet such as the Ball Python consists of rodents, Medium Python's Diet such as the Carpet Python consists of Chickens, Rodents and even Wallabys, Big Python's Diet such as the Indian Python consists of Rodents, Very Large Python's Diet such as the African Rock Python consists of Thomson's Gazelle, Nyala, Rodents and Nile Crocodiles, Massive Python's Diet such as the Burmese Python consists of Deer, Rodents, Mugger Crocodiles and Storks, Giant Python's Diet such as the Reticulated Python consists of Deer, Stray Dogs and Cats, Wild Pigs, Mugger Crocodiles and even Sun Bears.


What does ! mean in python?

* means multiply in Python.