Command Line arguments with sys.argv

In the example below, we use sys.argv to read in command line arguments into a python file names command-line-arguments.py. This implementation is in python3

import sys

def check_cli_arguments(): 
    print( f"You have entered {len(sys.argv)} cli argument")
    print(sys.argv)
    for _ in sys.argv:
        print(_)


check_cli_arguments()

To execute the program, we run python command-line-arguments.py and pass on a few arguments like below

$ python command-line-arguments.py python c++ R Javascript
You have entered 5 cli argument
['command-line-arguments.py', 'python', 'c++', 'R', 'Javascript']
command-line-arguments.py
python
c++
R
Javascript