Created
September 18, 2013 04:40
-
-
Save keum/6604611 to your computer and use it in GitHub Desktop.
Explains sys.argv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sys.argv is a list in Python, which contains the command-line arguments passed to the script. | |
With the len(sys.argv) function you can count the number of arguments. | |
If you are gonna work with command line arguments, you probably want to | |
use sys.argv. | |
To use sys.argv, you will first have to import the sys module. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment