Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lingling Jin (lij313)
BINF200-W2022
Commits
62317df8
Commit
62317df8
authored
Jan 31, 2022
by
Lingling Jin (lij313)
Browse files
update ex19
parent
12ce4521
Changes
1
Hide whitespace changes
Inline
Side-by-side
python-examples/ex19_log.txt
View file @
62317df8
bash-4.4$ diff ex18.py ex19.py
3,4c3,18
< for Arg in sys.argv:
< print ( Arg )
---
>
> # create a multi-line string
> Usage="""
> Usage:
> ex20.py [arguments]
> """
>
> # if no command-line arguments, output a usage message.
> # Otherwise, print the command line arguments
> if len( sys.argv ) == 1:
> print ( Usage )
> else:
> # we need to skip over sys.argv[0]
> ArgList = sys.argv[1:]
> for Arg in ArgList:
> print ( Arg )
bash-4.4$
bash-4.4$ chmod u+x ex19.py
bash-4.4$
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment