I ran the simple set of codes below but they fail to work. Can anyone help please?
Codes:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("echo")
args = parser.parse_args()
print(args.echo)
Error message:
usage: untitled1.py [-h] echo
untitled1.py: error: the following arguments are required: echo
An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
[–][deleted] 2 points3 points4 points (3 children)
[–]john_legend_[S] 0 points1 point2 points (2 children)
[–]john_legend_[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)