diff --git a/README.md b/README.md index 0c9b2c2..da94875 100644 --- a/README.md +++ b/README.md @@ -1018,13 +1018,13 @@ arguments = sys.argv[1:] ### Argparse ```python from argparse import ArgumentParser, FileType - = ArgumentParser(description=) -.add_argument('-', '--', action='store_true') # Flag -.add_argument('-', '--', type=) # Option -.add_argument('', type=, nargs=1) # First argument -.add_argument('', type=, nargs='+') # Remaining arguments - = .parse_args() -value = . +p = ArgumentParser(description=) +p.add_argument('-', '--', action='store_true') # Flag +p.add_argument('-', '--', type=) # Option +p.add_argument('', type=, nargs=1) # Argument +p.add_argument('', type=, nargs='+') # Arguments +args = p.parse_args() +value = args. ``` * **Use `'help='` for argument description.**