Skip to content

Instantly share code, notes, and snippets.

@keum
Created September 18, 2013 04:40
Show Gist options
  • Save keum/6604611 to your computer and use it in GitHub Desktop.
Save keum/6604611 to your computer and use it in GitHub Desktop.
Explains sys.argv
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