Skip to content

Instantly share code, notes, and snippets.

@filipecifali
Created February 21, 2013 13:10
Show Gist options
  • Save filipecifali/5004637 to your computer and use it in GitHub Desktop.
Save filipecifali/5004637 to your computer and use it in GitHub Desktop.
Samples...
$ cat teste.py
#!/usr/bin/env python
import sys
for a in sys.argv:
print a
$ ./teste.py 1 2 3 4
./teste.py
1
2
3
4
$ cat teste2.py
#!/usr/bin/env python
import sys
for a in sys.argv[]:
print a
./teste.py 1 2 3 4
File "./teste.py", line 5
for a in sys.argv[]:
^
SyntaxError: invalid syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment