Command Line Argument

Backtworace
Oct 29, 2020

Command Line Argument -affirm.y name
Command Line Argument in python w3schools
The affirm.y program has a few options to say nice things about a name. Here are three runs of the program in the command line. What the user types is in bold, followed by the program’s printed output.

$ python3 affirm.y -affirm Lisa
Everything is coming up Lisa
$ python3 affirm.y -affirm Bart
Looking good Bart
$ python3 affirm.y -affirm Maggie
Today is the day for Maggie
$
Command line arguments, or “args”, are extra information typed on the line when a program is run. The system is deceptively simple — the command line arguments are the words typed after the affirm.y on the command line, separated from each other by spaces. So in the first in this command line:
$ python3affirm.y -affirm Lisa

--

--