Ex 14 argv feature

Consider, my code has these two lines:
script, first = argv
second, third, fourth = argv
I know, that to assign them values I will have to pass command line arguments form shell. Is there a way I can pass different values to all my variables using argv feature of sys module? If yes, try not to give direct answer, instead share the resource/link here. Thanks

Kinda… argparse — Parser for command-line options, arguments and sub-commands — Python 3.9.5 documentation

Try the tutorial if you want a good working example. Link is on the page.

1 Like