Command line arguments in Python

for arg in sys.argv:
    print(arg)

sys.argv[0] is the python script name.

The script name can be absolute or relative depending on how the script was started:

Prerequsite

import sys